
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="canonical" href="https://blog.csdn.net/u013598405/article/details/114239804"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content='{"pid": "blog", "spm":"1001.2101"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link  href="https://g.csdnimg.cn/static/logo/favicon32.ico"  rel="shortcut icon" type="image/x-icon" />
    <title>华为机试23题总结_coder 明轩的博客-CSDN博客_为了充分发挥gpu算力</title>
    <script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="为了充分发挥gpu算力">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"为了充分发挥gpu算力"}'>
    <meta name="description" content="第一题 勾股元组数//    如果三个正整数A B C ,A²+B²=C²则为勾股数    // 如果ABC之间两两互质，即A与B A与C B与C均互质没有公约数，    // 则称其为勾股数元组。//    请求出给定n m 范围内所有的勾股数元组//    输入描述//     起始范围 1&amp;lt;n&amp;lt;10000  n&amp;lt;m&amp;lt;10000//    输出目描述//      abc 保证a&amp;lt;b...">
    <script src="//g.csdnimg.cn/tingyun/1.8.5/blog.js" type='text/javascript'></script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/css/detail_enter-fc93cb31f0.min.css">
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/u013598405/article/details/114239804","appid":"1638831770136827","pubDate":"2021-02-28T20:55:42","title":"华为机试23题总结_coder 明轩的博客-CSDN博客_为了充分发挥gpu算力","upDate":"2021-02-28T21:24:50"}</script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin3-template/skin3-template-762f7595fd.min.css">
    <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "u013598405";
        var skinImg = "white";
        var blog_address = "https://blog.csdn.net/u013598405";
        var currentUserName = "wangmike19";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/u013598405/article/details/114239804";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/7/B/0/3_u013598405";
        var articleTitle = "华为机试23题总结";
        var articleDesc = "第一题 勾股元组数//    如果三个正整数A B C ,A²+B²=C²则为勾股数    // 如果ABC之间两两互质，即A与B A与C B与C均互质没有公约数，    // 则称其为勾股数元组。//    请求出给定n m 范围内所有的勾股数元组//    输入描述//     起始范围 1&amp;lt;n&amp;lt;10000  n&amp;lt;m&amp;lt;10000//    输出目描述//      abc 保证a&amp;lt;b...";
        var articleTitles = "华为机试23题总结_coder 明轩的博客-CSDN博客_为了充分发挥gpu算力";
        var nickName = "coder 明轩";
        var articleDetailUrl = "https://blog.csdn.net/u013598405/article/details/114239804";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
    </script>
    <script src="https://g.csdnimg.cn/??fixed-sidebar/1.1.6/fixed-sidebar.js" type="text/javascript"></script>
    <script src='//g.csdnimg.cn/common/csdn-report/report.js' type='text/javascript'></script>
    <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="https://dup.baidustatic.com/js/ds.js"></script>
</head>
  <body class="nodata " style="">
        <script>
            var toolbarSearchExt = '{"landingWord":["为了充分发挥gpu算力"],"queryWord":"","tag":["字符串"],"title":"华为机试23题总结"}';
        </script>
    <script src="https://g.csdnimg.cn/common/csdn-toolbar/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/pc/css/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/chart-3456820cac.css" />

<script>
    var articleId = 114239804;
    var commentscount = 4;
    var curentUrl = "https://blog.csdn.net/u013598405/article/details/114239804";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["充分发挥","字符串","gpu","23","总结","为了","华为","机试","算力","题"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = true;
    var baiduCount = 2;
    var setBaiduJsCount = 10;
    var share_card_url = "https://app-blog.csdn.net/share?article_id=114239804&username=u013598405"
	var articleType = 1;
    var baiduKey = "为了充分发挥gpu算力";
    var userNewReport = true;
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "atom-one-light";
    var baiduSearchType = "baidulandingword";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showHeadWord = true;
    var showSearchText = "";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
    var isShowToQuestion = false;
    var baiduSearchChannel = 'pc_relevant'
    var baiduSearchIdentification = '.pc_relevant_default'
    var distRequestId = '1654911216196_83686'
    var initRewardObject = {
        giver: "wangmike19",
        anchor: "u013598405",
        articleId: "114239804",
        sign: "44dfb6632ea2aeed7fcb7743f7201c16",
    }
    var isLikeStatus = false;
    var isUnLikeStatus = false;
    var studyLearnWord = "";
    var isCurrentUserVip = false;
    var testNewStyle = "oldStyle"
    var isShowConcision = false;
    var isCookieConcision = false
    var isHasDirectoryModel = false
    var isShowSideModel = false
    var isShowDirectoryModel = true
    function getCookieConcision(sName){
        var allCookie = document.cookie.split("; ");
        for (var i=0; i < allCookie.length; i++){
            var aCrumb = allCookie[i].split("=");
            if (sName == aCrumb[0])
                return aCrumb[1];
        }
        return null;
    }
    if (getCookieConcision('blog_details_concision') && getCookieConcision('blog_details_concision') == 0){
        isCookieConcision = true
        isShowSideModel = true
        isShowDirectoryModel = false
    }
</script>
<div class="main_father clearfix d-flex justify-content-center " style="height:100%;"> 
    <div class="container clearfix " id="mainBox">
        <script>
        if(!isCookieConcision){
            $('.main_father').removeClass('mainfather-concision')
            $('.main_father .container').removeClass('container-concision')
        }
        </script>
        <main>
<script type="text/javascript">
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
        <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">华为机试23题总结</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName " href="https://blog.csdn.net/u013598405" target="_blank" rel="noopener">coder 明轩</a>
                    <img class="article-time-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newUpTime2.png" alt="">
                    <span class="time">已于&nbsp;2022-05-17 14:46:02&nbsp;修改</span>
                    <img class="article-read-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/articleReadEyes2.png" alt="">
                    <span class="read-count">14231</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click='{"mod":"popu_823","spm":"1001.2101.3001.4232","ab":"new"}'>
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect2.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive2.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            151
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/u013598405/category_10739934.html" target="_blank" rel="noopener">面试刷题</a>
                                <a class="tag-link" href="https://blog.csdn.net/u013598405/category_10723931.html" target="_blank" rel="noopener">编程学习笔记</a>
                            <span class="label">文章标签：</span>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"字符串","ab":"new"}' class="tag-link" href="https://so.csdn.net/so/search/s.do?q=%E5%AD%97%E7%AC%A6%E4%B8%B2&amp;t=blog&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">字符串</a>
                    </div>
                </div>
                <div class="up-time"><span>于&nbsp;2021-02-28 21:24:50&nbsp;首次发布</span></div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/u013598405/article/details/114239804" target="_blank">https://blog.csdn.net/u013598405/article/details/114239804</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 ">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/u013598405/category_10739934.html" target="_blank" title="面试刷题"
                        data-report-view='{"spm":"1001.2101.3001.6332"}'
                        data-report-click='{"spm":"1001.2101.3001.6332"}'>
                            <img class="item-target" src="https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="">
                            <span class="title item-target">
                                <span>
                                <span class="tit">面试刷题</span>
                                    <span class="dec more">同时被 2 个专栏收录<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/newArrowDown1White.png" alt=""></span>
                                </span>
                            </span>
                        </a>
                    </div>
                    <div class="item-m">
                        <span>5 篇文章</span>
                        <span>9 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="10739934">订阅专栏</a>
                    </div>
                </div>
                <div class="column-group-item column-group1 ">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/u013598405/category_10723931.html" target="_blank" title="编程学习笔记"
                        data-report-view='{"spm":"1001.2101.3001.6332"}'
                        data-report-click='{"spm":"1001.2101.3001.6332"}'>
                            <img class="item-target" src="https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="">
                            <span class="title item-target">
                                <span>
                                <span class="tit">编程学习笔记</span>
                                </span>
                            </span>
                        </a>
                    </div>
                    <div class="item-m">
                        <span>18 篇文章</span>
                        <span>2 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="10723931">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-163de54645.css">
                <div id="content_views" class="htmledit_views">
                    <p>&#xff08;声明&#xff1a;我没有全量用例&#xff0c;所以不保证全过&#xff0c;只能说给出样例输入可以跑过。不要指望我这是标准答案&#xff0c;这也是自己写的。要标准答案的自己写去。&#xff09;</p> 
<p id="main-toc"><strong>目录</strong></p> 
<p id="%E7%AC%AC%E4%B8%80%E9%A2%98%20%E5%8B%BE%E8%82%A1%E5%85%83%E7%BB%84%E6%95%B0-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%B8%80%E9%A2%98%20%E5%8B%BE%E8%82%A1%E5%85%83%E7%BB%84%E6%95%B0">第一题 勾股元组数</a></p> 
<p id="%E7%AC%AC%E4%BA%8C%E9%A2%98%C2%A0%20%E6%95%B4%E6%95%B0%E5%AF%B9%E6%9C%80%E5%B0%8F%E5%92%8C-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%8C%E9%A2%98%C2%A0%20%E6%95%B4%E6%95%B0%E5%AF%B9%E6%9C%80%E5%B0%8F%E5%92%8C">第二题  整数对最小和</a></p> 
<p id="%E7%AC%AC%E4%B8%89%E9%A2%98%C2%A0%20n%20%E9%98%B6%E6%96%B9%E9%98%B5%E5%92%8C-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%B8%89%E9%A2%98%C2%A0%20n%20%E9%98%B6%E6%96%B9%E9%98%B5%E5%92%8C">第三题  n 阶方阵和</a></p> 
<p id="%E7%AC%AC%E5%9B%9B%E9%A2%98%C2%A0%20TLV%E8%A7%A3%E7%A0%81-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%9B%9B%E9%A2%98%C2%A0%20TLV%E8%A7%A3%E7%A0%81">第四题  TLV解码</a></p> 
<p id="%E7%AC%AC%E4%BA%94%E9%A2%98%C2%A0%20%E7%8C%B4%E5%AD%90%E8%B7%B3%E5%8F%B0%E9%98%B6%201%E7%BA%A7%E5%92%8C3%E7%BA%A7%EF%BC%88%E9%80%92%E5%BD%92%E7%9A%84%E5%BE%AA%E7%8E%AF%E5%86%99%E6%B3%95%EF%BC%89-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%94%E9%A2%98%C2%A0%20%E7%8C%B4%E5%AD%90%E8%B7%B3%E5%8F%B0%E9%98%B6%201%E7%BA%A7%E5%92%8C3%E7%BA%A7%EF%BC%88%E9%80%92%E5%BD%92%E7%9A%84%E5%BE%AA%E7%8E%AF%E5%86%99%E6%B3%95%EF%BC%89">第五题  猴子跳台阶 1级和3级&#xff08;递归的循环写法&#xff09;</a></p> 
<p id="%E7%AC%AC%E5%85%AD%E9%A2%98%C2%A0%20GPU%20%E7%AE%97%E5%8A%9B-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%85%AD%E9%A2%98%C2%A0%20GPU%20%E7%AE%97%E5%8A%9B">第六题  GPU 算力</a></p> 
<p id="%E7%AC%AC%E4%B8%83%E9%A2%98%C2%A0%20%E8%BA%AB%E9%AB%98%E6%8E%92%E5%BA%8F%EF%BC%88%E7%BB%9D%E5%AF%B9%E5%B7%AE%E5%80%BC%EF%BC%89%E3%80%90%E8%80%83%E5%AF%9F%20list.sort(new%20Comparator%3C%3E()%7B%7D)%E3%80%91-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%B8%83%E9%A2%98%C2%A0%20%E8%BA%AB%E9%AB%98%E6%8E%92%E5%BA%8F%EF%BC%88%E7%BB%9D%E5%AF%B9%E5%B7%AE%E5%80%BC%EF%BC%89%E3%80%90%E8%80%83%E5%AF%9F%20list.sort%28new%20Comparator%3C%3E%28%29%7B%7D%29%E3%80%91">第七题  身高排序&#xff08;绝对差值&#xff09;【考察 list.sort(new Comparator&lt;&gt;(){})】</a></p> 
<p id="%E7%AC%AC%E5%85%AB%E9%A2%98%C2%A0%20%E5%8C%BA%E9%97%B4%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%80%92%E8%BD%AC%E8%BE%93%E5%87%BA-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%85%AB%E9%A2%98%C2%A0%20%E5%8C%BA%E9%97%B4%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%80%92%E8%BD%AC%E8%BE%93%E5%87%BA">第八题  区间字符串倒转输出</a></p> 
<p id="%E7%AC%AC%E4%B9%9D%E9%A2%98%C2%A0%20%E8%B4%AD%E4%B9%B0%E6%9C%80%E5%A4%9A%E5%95%86%E5%93%81%E3%80%90%E7%A9%B7%E4%B8%BE%E6%B3%95%EF%BC%8CTreeSet%20%E6%8E%92%E5%BA%8F%E3%80%91-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%B9%9D%E9%A2%98%C2%A0%20%E8%B4%AD%E4%B9%B0%E6%9C%80%E5%A4%9A%E5%95%86%E5%93%81%E3%80%90%E7%A9%B7%E4%B8%BE%E6%B3%95%EF%BC%8CTreeSet%20%E6%8E%92%E5%BA%8F%E3%80%91">第九题  购买最多商品【穷举法&#xff0c;TreeSet 排序】</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E9%A2%98%C2%A0%20%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%8E%92%E5%BA%8F-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E9%A2%98%C2%A0%20%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%8E%92%E5%BA%8F">第十题  字符串排序</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%B8%80%E9%A2%98%20int%20%E5%AD%97%E8%8A%82%E5%92%8C%EF%BC%88%E4%BD%8D%E8%BF%90%E7%AE%97%EF%BC%89-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%B8%80%E9%A2%98%20int%20%E5%AD%97%E8%8A%82%E5%92%8C%EF%BC%88%E4%BD%8D%E8%BF%90%E7%AE%97%EF%BC%89">第十一题 int 字节和&#xff08;位运算&#xff09;</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E6%97%A0%E9%A2%98%E7%9B%AE%EF%BC%8C%E5%A5%BD%E5%83%8F%E6%98%AF%E8%BF%B7%E5%AE%AB-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E6%97%A0%E9%A2%98%E7%9B%AE%EF%BC%8C%E5%A5%BD%E5%83%8F%E6%98%AF%E8%BF%B7%E5%AE%AB">第十二题  无题目&#xff0c;好像是迷宫</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%B8%89%E9%A2%98%20%E4%BA%8C%E5%8F%89%E6%A0%91%E5%AD%98%E5%82%A8%E6%95%B0%E7%BB%84-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%B8%89%E9%A2%98%20%E4%BA%8C%E5%8F%89%E6%A0%91%E5%AD%98%E5%82%A8%E6%95%B0%E7%BB%84">第十三题 二叉树存储数组</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E5%9B%9B%E9%A2%98%C2%A0%20%E8%A3%85%E6%9C%80%E5%A4%9A%E5%BF%AB%E9%80%92-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E5%9B%9B%E9%A2%98%C2%A0%20%E8%A3%85%E6%9C%80%E5%A4%9A%E5%BF%AB%E9%80%92">第十四题  装最多快递</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%BA%94%E9%A2%98%C2%A0%20%E8%88%AA%E5%A4%A9%E5%99%A8%E5%A4%AA%E9%98%B3%E8%83%BD%E6%9D%BF%EF%BC%8C%E6%97%A0%E5%9B%BE%E7%9C%8B%E4%B8%8D%E6%87%82-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%BA%94%E9%A2%98%C2%A0%20%E8%88%AA%E5%A4%A9%E5%99%A8%E5%A4%AA%E9%98%B3%E8%83%BD%E6%9D%BF%EF%BC%8C%E6%97%A0%E5%9B%BE%E7%9C%8B%E4%B8%8D%E6%87%82">第十五题  航天器太阳能板&#xff0c;无图看不懂</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E5%85%AD%E9%A2%98%C2%A0%20%E5%8D%95%E8%AF%8D%E6%8E%A5%E9%BE%99%C2%A0%20%E5%90%8E%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%89%8D%E7%BC%80%E6%98%AF%E5%89%8D%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%90%8E%E7%BC%80-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E5%85%AD%E9%A2%98%C2%A0%20%E5%8D%95%E8%AF%8D%E6%8E%A5%E9%BE%99%C2%A0%20%E5%90%8E%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%89%8D%E7%BC%80%E6%98%AF%E5%89%8D%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%90%8E%E7%BC%80">第十六题  单词接龙  后一个字符串前缀是前一个字符串后缀</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%B8%83%E9%A2%98%C2%A0%20%E7%AC%AC%20k%20%E9%95%BF%E5%AD%90%E4%B8%B2-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%B8%83%E9%A2%98%C2%A0%20%E7%AC%AC%20k%20%E9%95%BF%E5%AD%90%E4%B8%B2">第十七题  第 k 长子串</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E5%85%AB%E9%A2%98%C2%A0%20%E5%96%8A7-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E5%85%AB%E9%A2%98%C2%A0%20%E5%96%8A7">第十八题  喊7</a></p> 
<p id="%E7%AC%AC%E5%8D%81%E4%B9%9D%E9%A2%98%C2%A0%20%E5%88%A0%E9%99%A4%E5%87%BA%E7%8E%B0%E6%AC%A1%E6%95%B0%E6%9C%80%E5%B0%91%E5%AD%97%E7%AC%A6%E4%B8%B2-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E5%8D%81%E4%B9%9D%E9%A2%98%C2%A0%20%E5%88%A0%E9%99%A4%E5%87%BA%E7%8E%B0%E6%AC%A1%E6%95%B0%E6%9C%80%E5%B0%91%E5%AD%97%E7%AC%A6%E4%B8%B2">第十九题  删除出现次数最少字符串</a></p> 
<p id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E9%A2%98%C2%A0%20%E8%B5%B0%E5%88%B0%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E6%88%90%E5%91%98%E6%9C%80%E5%B0%8F%E6%AD%A5%E6%95%B0-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%8C%E5%8D%81%E9%A2%98%C2%A0%20%E8%B5%B0%E5%88%B0%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E6%88%90%E5%91%98%E6%9C%80%E5%B0%8F%E6%AD%A5%E6%95%B0">第二十题  走到最后一个成员最小步数</a></p> 
<p id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%80%E9%A2%98%EF%BC%88%E5%90%8C%E4%BA%8C%E5%8D%81%E9%A2%98%EF%BC%89-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%80%E9%A2%98%EF%BC%88%E5%90%8C%E4%BA%8C%E5%8D%81%E9%A2%98%EF%BC%89">第二十一题&#xff08;同二十题&#xff09;</a></p> 
<p id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E8%BD%AE%E6%B5%81%E5%90%88%E5%B9%B6%E6%96%B0%E6%95%B0%E7%BB%84-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E8%BD%AE%E6%B5%81%E5%90%88%E5%B9%B6%E6%96%B0%E6%95%B0%E7%BB%84">第二十二题  轮流合并新数组</a></p> 
<p id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%89%E9%A2%98%C2%A0%20%E7%A3%81%E7%9B%98%E5%AE%B9%E9%87%8F%E6%8E%92%E5%BA%8F-toc" style="margin-left:80px;"><a href="#%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%89%E9%A2%98%C2%A0%20%E7%A3%81%E7%9B%98%E5%AE%B9%E9%87%8F%E6%8E%92%E5%BA%8F">第二十三题  磁盘容量排序</a></p> 
<hr />
<h3 id="%E7%AC%AC%E4%B8%80%E9%A2%98%20%E5%8B%BE%E8%82%A1%E5%85%83%E7%BB%84%E6%95%B0">第一题 勾股元组数</h3> 
<blockquote> 
 <p>//        如果三个正整数A B C ,A²&#43;B²&#61;C²则为勾股数<br />         // 如果ABC之间两两互质&#xff0c;即A与B A与C B与C均互质没有公约数&#xff0c;<br />         // 则称其为勾股数元组。<br /> //        请求出给定n m 范围内所有的勾股数元组<br /> //        输入描述<br /> //          起始范围 1&lt;n&lt;10000    n&lt;m&lt;10000<br /> //        输出目描述<br /> //           abc 保证a&lt;b&lt;c输出格式  a b c<br /> //           多组勾股数元组 按照a升序b升序 c升序的排序方式输出。<br /> //           给定范围内&#xff0c;找不到勾股数元组时&#xff0c;输出  Na</p> 
 <p>        // 案例<br />         //  输入<br />         //   1<br />         //   20<br />         //  输出<br />         //   3 4 5<br />         //   5 12 13<br />         //   8 15 17</p> 
 <p>        //  输入<br />         //    5<br />         //    10<br />         //  输出<br />         //    Na</p> 
 <p>【笔记】</p> 
 <p>关键点</p> 
 <p>1. a b 互质&#xff0c;即 a 和 b 的公约数&#61;&#61;1</p> 
 <p>这里用阿基里德算法&#xff08;辗转相除法&#xff09;&#xff0c;递归方式&#xff0c;如果最后结果&#61;&#61;1&#xff0c;表示a,b 互质</p> 
 <p>gcd(a,b) &#61; gcd(b, a%b)</p> 
 <p>2. i&#xff0c;j&#xff0c;k 用穷举法得出&#xff0c;满足条件 i&lt;j&lt;k&#xff0c;且 i,j,k 两两互质</p> 
</blockquote> 
<pre><code class="language-java">import java.util.Scanner;

public class Test1 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        int count &#61; 0;
        int n &#61; sc.nextInt();
        int m &#61; sc.nextInt();

        for(int i &#61; n; i&lt;m; i&#43;&#43;){
            for(int j&#61;n&#43;1; j&lt;m; j&#43;&#43;){
                for(int k&#61;j&#43;1; k&lt;&#61;m; k&#43;&#43;){
                    if(i&lt;j &amp;&amp; j&lt;k &amp;&amp; (i*i &#43; j*j &#61;&#61; k*k) &amp;&amp;gcd(i,j)&#61;&#61;1 &amp;&amp; gcd(j,k)&#61;&#61;1 &amp;&amp; gcd(i,k)&#61;&#61;1){
                        System.out.println(i&#43;&#34;,&#34;&#43;j&#43;&#34;,&#34;&#43;k);
                        count&#43;&#43;;
                    }
                }
            }
        }

        if(0 &#61;&#61; count)
            System.out.println(&#34;Na&#34;);
    }

    public static int gcd(int a, int b){
        if(0&#61;&#61;b) return a;
        return gcd(b,a%b);
    }
}</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E4%BA%8C%E9%A2%98%C2%A0%20%E6%95%B4%E6%95%B0%E5%AF%B9%E6%9C%80%E5%B0%8F%E5%92%8C">第二题  整数对最小和</h3> 
<blockquote> 
 <p>//        给定两个整数数组<br />         //array1 array2  数组元素按升序排列<br />         // 假设从arr1 arr2中分别取出一个元素&#xff0c;可构成一对元素<br />         // 现在需要取出k对元素&#xff0c;并对取出的所有元素求和<br />         // 计算和的最小值<br />         // 注意&#xff1a;两对元素对应arr1 arr2的下标是相同的<br />         //       视为同一对元素</p> 
 <p>        //输入描述<br />         //    输入两行数组arr1 arr2<br />         //    每行首个数字为数组大小size   0&lt;size&lt;&#61;100<br />         //    arr1&#xff0c;2中的每个元素   0&lt; &lt;1000<br />         //    接下来一行  正整数k   0&lt;k&lt;&#61;arr1.size * arr2.size<br />         // 输出描述<br />         //   满足要求的最小值</p> 
 <p>        // 例子</p> 
 <p>        //输入<br />         //   3 1 1 2<br />         //   3 1 2 3<br />         //   2</p> 
 <p>        //输出<br />         //   4</p> 
 <p>        //说明&#xff1a;用例中需要取两个元素&#xff0c;<br />         // 取第一个数组第0个元素与第二个数组第0个元素组成一个元素<br />         // [1,1]<br />         //取第一个数组第1个元素与第二个数组第0个元素组成一个元素<br />         // [1,1]</p> 
 <p>        //求和为1&#43;1&#43;1&#43;1&#61;4 ,满足要求最小<br />  </p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test2 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] str1 &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        String[] str2 &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        int n &#61; sc.nextInt();
        ArrayList&lt;Integer&gt; arr &#61; new ArrayList();
        for(int i&#61;1; i&lt;str1.length; i&#43;&#43;){
            for(int j&#61;1; j&lt;str2.length; j&#43;&#43;){
                arr.add(Integer.parseInt(str1[i])&#43;Integer.parseInt(str2[j]));
            }
        }
        System.out.println(arr);
        Collections.sort(arr);
        int sum &#61; 0;
        for(int i &#61;0; i&lt;n;i&#43;&#43;){
            sum&#43;&#61;arr.get(i);
        }
        System.out.println(sum);

    }
}
</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E4%B8%89%E9%A2%98%C2%A0%20n%20%E9%98%B6%E6%96%B9%E9%98%B5%E5%92%8C">第三题  n 阶方阵和</h3> 
<blockquote> 
 <p>/*<br />         给出n阶方阵里所有数<br />         求方阵里所有数的和<br />         输入描述&#xff1a;<br />           输入有多个测试用例<br />           每个测试用例第一个第一个整数n   n&lt;&#61;1000 表示方阵阶数为n<br />           接下来是n行的数字&#xff0c;每行n个数字用空格隔开<br />         输出描述&#xff1a;<br />           输出一个整数表示n阶方阵的和<br />         例子&#xff1a;<br />           输入<br />               3<br />               1 2 3<br />               2 1 3<br />               3 2 1<br />           输出<br />               18<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner sc &#61; new Scanner(System.in);
        int num &#61; Integer.parseInt(sc.nextLine());
        //int num &#61; sc.nextInt();//这样写的话&#xff0c;下面 sum&#43;那一行会报错 For input string: &#34;&#34;
        int sum &#61; 0;
        for(int i &#61; 0; i&lt;num; i&#43;&#43;){
            String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
            for(int j &#61;0; j&lt;num; j&#43;&#43;){
                sum &#43;&#61; Integer.parseInt(split[j]);
            }
        }
        System.out.println(sum);
    }
}</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E5%9B%9B%E9%A2%98%C2%A0%20TLV%E8%A7%A3%E7%A0%81">第四题  TLV解码</h3> 
<blockquote> 
 <p>/*<br />         TLV编码是按 Tag Length  Value格式进行编码的<br />         一段码流中的信元用tag标识&#xff0c;tag在码流中唯一不重复<br />         length表示信元value的长度  value表示信元的值<br />         码流以某信元的tag开头 &#xff0c;tag固定占一个字节<br />         length固定占两个字节&#xff0c;字节序为小端序<br />         现给定tlv格式编码的码流以及需要解码的信元tag<br />         请输出该信元的value</p> 
 <p>        输入码流的16机制字符中&#xff0c;不包括小写字母<br />         且要求输出的16进制字符串中也不要包含字符字母<br />         码流字符串的最大长度不超过50000个字节</p> 
 <p>        输入描述<br />            第一行为第一个字符串 &#xff0c;表示待解码信元的tag<br />            输入第二行为一个字符串&#xff0c; 表示待解码的16进制码流<br />           字节之间用空格分割<br />         输出描述<br />            输出一个字符串&#xff0c;表示待解码信元以16进制表示的value</p> 
 <p>           例子&#xff1a;<br />            输入&#xff1a;<br />             31<br />             32 01 00 AE 90 02 00 01 02 30 03 00 AB 32 31 31 02 00 32 33 33 01 00 CC</p> 
 <p>           输出<br />             32 33</p> 
 <p>           说明&#xff1a;<br />            需要解析的信源的tag是31<br />            从码流的起始处开始匹配&#xff0c;tag为32的信元长度为1(01 00,小端序表示为1)<br />            第二个信元的tag为90 其长度为2<br />            第三个信元的tag为30 其长度为3<br />            第四个信元的tag为31 其长度为2(02 00)<br />            所以返回长度后面的两个字节即可 为 32 33<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;

public class Test4 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String tag &#61; sc.nextLine();
        String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);

        for(int i&#61;0; i&lt;split.length; ){
            int len &#61; Integer.parseInt(split[i&#43;2]&#43;split[i&#43;1],16);
            if(tag.equals(split[i])){
                StringBuilder bu &#61; new StringBuilder();
                for(int j&#61;i&#43;3; j&lt;i&#43;3&#43;len;j&#43;&#43;){
                    bu.append(split[j]).append(&#34; &#34;);
                }
                System.out.println(bu.toString());
                break;
            }
            else{
                i&#43;&#61;len&#43;3;
            }
        }

    }
}
</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E4%BA%94%E9%A2%98%C2%A0%20%E7%8C%B4%E5%AD%90%E8%B7%B3%E5%8F%B0%E9%98%B6%201%E7%BA%A7%E5%92%8C3%E7%BA%A7%EF%BC%88%E9%80%92%E5%BD%92%E7%9A%84%E5%BE%AA%E7%8E%AF%E5%86%99%E6%B3%95%EF%BC%89">第五题  猴子跳台阶 1级和3级&#xff08;递归的循环写法&#xff09;</h3> 
<blockquote> 
 <p>/*<br /><span style="color:#f33b45;">labuladong 书上有提到&#xff0c;大概画了个图&#xff0c;但是尚未完全搞明白</span></p> 
 <p> 一天一只顽猴想要从山脚爬到山顶<br />   途中经过一个有n个台阶的阶梯&#xff0c;但是这个猴子有个习惯&#xff0c;每一次只跳1步或3步<br />   试问&#xff1f;猴子通过这个阶梯有多少种不同的跳跃方式</p> 
 <p>  输入描述&#xff1a;<br />     输入只有一个这个数n    0&lt;n&lt;50<br />     此阶梯有多个台阶<br />   输出描述&#xff1a;<br />     有多少种跳跃方式</p> 
 <p>  实例:<br />    输入<br />      50<br />    输出<br />       122106097</p> 
 <p>   输入<br />       3<br />    输出<br />       2<br />  */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) {
        Scanner in &#61; new Scanner(System.in);
        int n &#61; in.nextInt();

        int f1 &#61; 1;
        int f2 &#61; 1;
        int f3 &#61; 2;
        int f4 &#61; n &#61;&#61; 1 || n &#61;&#61; 2 ? 1 : 2;
        for (int i &#61; 4; i &lt;&#61; n; i&#43;&#43;) {
            f4 &#61; f3 &#43; f1;
            f1 &#61; f2;
            f2 &#61; f3;
            f3 &#61; f4;
        }

        System.out.println(f4);

        in.close();

    }
}
</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E5%85%AD%E9%A2%98%C2%A0%20GPU%20%E7%AE%97%E5%8A%9B">第六题  GPU 算力</h3> 
<blockquote> 
 <p>/*<br />          为了充分发挥Gpu算力&#xff0c;<br />          需要尽可能多的将任务交给GPU执行&#xff0c;<br />          现在有一个任务数组&#xff0c;<br />          数组元素表示在这1s内新增的任务个数&#xff0c;<br />          且每秒都有新增任务&#xff0c;<br />          假设GPU最多一次执行n个任务&#xff0c;<br />          一次执行耗时1s&#xff0c;<br />          在保证Gpu不空闲的情况下&#xff0c;最少需要多长时间执行完成。</p> 
 <p>         输入描述<br />            第一个参数为gpu最多执行的任务个数<br />            取值范围1~10000<br />            第二个参数为任务数组的长度<br />            取值范围1~10000<br />            第三个参数为任务数组<br />            数字范围1~10000</p> 
 <p>         输出描述<br />            执行完所有任务需要多少秒</p> 
 <p>         例子<br />            输入<br />             3<br />             5<br />             1 2 3 4 5<br />            输出<br />             6</p> 
 <p>            说明&#xff0c;一次最多执行3个任务  最少耗时6s</p> 
 <p>          例子2<br />             输入<br />              4<br />              5<br />              5 4 1 1 1<br />             输出<br />              5</p> 
 <p>           说明&#xff0c;一次最多执行4个任务  最少耗时5s<br />          */</p> 
</blockquote> 
<pre><code class="language-java">/*
用 more 变量削峰&#xff0c;一次处理1秒内新增的任务&#xff0c;处理不完的放下一秒一起处理。
 */

import java.util.Scanner;

public class Test6 {
    //自己写的
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        int n &#61; Integer.parseInt(sc.nextLine().trim());
        int m &#61; Integer.parseInt(sc.nextLine().trim());
        String[] str &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);

        int time&#61;0;
        int more&#61;0;
        for(String i:str){
            int j &#61; Integer.parseInt(i);
            if(j&#43;more&gt;n)more &#61; more&#43;j-n;
            else
                more&#61;0;
            time&#43;&#43;;
        }
        while(more&gt;0){
            more &#61; more-n;
            time&#43;&#43;;
        }
        System.out.println(time);
    }
}
</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E4%B8%83%E9%A2%98%C2%A0%20%E8%BA%AB%E9%AB%98%E6%8E%92%E5%BA%8F%EF%BC%88%E7%BB%9D%E5%AF%B9%E5%B7%AE%E5%80%BC%EF%BC%89%E3%80%90%E8%80%83%E5%AF%9F%20list.sort(new%20Comparator%3C%3E()%7B%7D)%E3%80%91">第七题  身高排序&#xff08;绝对差值&#xff09;【考察 list.sort(new Comparator&lt;&gt;(){})】</h3> 
<blockquote> 
 <p>/*<br />          小明今年升学到了小学1年纪<br />          来到新班级后&#xff0c;发现其他小朋友身高参差不齐<br />          然后就想基于各小朋友和自己的身高差&#xff0c;对他们进行排序<br />          请帮他实现排序<br />          输入描述<br />           第一行为正整数 h和n<br />           0&lt;h&lt;200 为小明的身高<br />           0&lt;n&lt;50 为新班级其他小朋友个数<br />           第二行为n各正整数<br />            h1 ~ hn分别是其他小朋友的身高<br />          取值范围0&lt;hi&lt;200<br />          且n个正整数各不相同</p> 
 <p>         输出描述<br />           输出排序结果&#xff0c;各正整数以空格分割<br />           和小明身高差绝对值最小的小朋友排在前面<br />           和小明身高差绝对值最大的小朋友排在后面<br />           如果两个小朋友和小明身高差一样<br />           则个子较小的小朋友排在前面</p> 
 <p>          示例一<br />           输入<br />           100 10<br />           95 96 97 98 99 101 102 103 104 105<br />           输出<br />            99 101 98 102 97 103 96 104 95 105</p> 
 <p>          说明  小明身高100<br />           班级学生10个  身高分别为<br />          */<br />  </p> 
</blockquote> 
<pre><code class="language-java">import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;

/*
题目7&#xff1a;重点考察 重写 Comparator 接口的 compare 方法
注意书写格式
new Comparator&lt;T&gt;(){
    &#64;override
    public int compare(T o1, T o2){

    }
}
 */
public class Test7 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] str1 &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        String[] str2 &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        int h &#61; Integer.parseInt(str1[0]);
        int n &#61; Integer.parseInt(str1[1]);

        ArrayList&lt;Integer&gt; list &#61; new ArrayList&lt;&gt;();
        for(String s:str2){
            list.add(Integer.parseInt(s));
        }

        list.sort(new Comparator&lt;Integer&gt;(){
            &#64;Override
            public int compare(Integer h1,Integer h2){
                int d1 &#61; h1-h;
                int d2 &#61; h2-h;
                d1 &#61; d1&gt;0?d1:-d1;
                d2 &#61; d2&gt;0?d2:-d2;
                if(d1!&#61;d2) return d1-d2;
                else return h1-h2;   //Integer 可以直接相减&#xff0c;String 或其它类型自然排序得用 o1.compareTo(o2) 了
            }
        });

        StringBuilder bu &#61; new StringBuilder();
        for(int i&#61;0; i&lt;list.size(); i&#43;&#43;){
            bu.append(list.get(i)).append(&#34; &#34;);
        }
        System.out.println(bu.toString());
    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E5%85%AB%E9%A2%98%C2%A0%20%E5%8C%BA%E9%97%B4%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%80%92%E8%BD%AC%E8%BE%93%E5%87%BA">第八题  区间字符串倒转输出</h3> 
<blockquote> 
 <p>/*<br />         输入一个英文文章片段<br />         翻转指定区域的单词顺序<br />         标点符号和普通字母一样处理<br />         例如输入字符串 I am a developer.<br />         [0,3]<br />         则输出 developer. a am I</p> 
 <p>        输入描述<br />          使用换行隔开3个参数<br />          第一个参数为文章内容 即英文字符串<br />          第二个参数为翻转起始单词下标&#xff0c;下标从0开始<br />          第三个参数为结束单词下标</p> 
 <p>         输出描述</p> 
 <p>         翻转后英文文章片段每个单词之间以一个半角空格分割输出</p> 
 <p>         例子</p> 
 <p>          输入<br />            I am a developer.<br />            0<br />            3<br />           输出<br />            I a am developer.</p> 
 <p>          输入<br />             hello world!<br />           0<br />           3<br />           输出<br />           world! hello</p> 
 <p>输入字符串可以在前面或者后面包含多个空格<br /> 但是翻转后的字符不能包括</p> 
 <p>指定反转区间只有一个单词<br /> 或无有效单词<br /> 则输出EMPTY</p> 
</blockquote> 
<pre><code class="language-java">import java.util.Scanner;
/*
题目8 考察反转字符串&#xff0c;主要是区间范围内反转
要用两个index变量
非反转区间的就用 i&#43;&#43;
反转区间 j-- (j 提前赋值&#61;end)
 */
public class Test8 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] words &#61; sc.nextLine().trim().split(&#34;\\s&#43;&#34;);
        int start &#61; Integer.parseInt(sc.nextLine().trim());
        int end &#61; Integer.parseInt(sc.nextLine().trim());

        int i&#61;0;
        int j&#61;end&lt;(words.length)?end:words.length-1;
        StringBuilder bu &#61; new StringBuilder();
        String res &#61; &#34;EMPTY&#34;;

        if(start&gt;&#61;0 &amp;&amp; end&gt;0 &amp;&amp; start&lt;end &amp;&amp; start&lt;words.length){
            while(i&lt;words.length){
                if(i&lt;start||i&gt;end){
                    bu.append(words[i&#43;&#43;]).append(&#34; &#34;);
                }
                else if(i&gt;&#61;start &amp;&amp; i&lt;&#61;end){
                    bu.append(words[j--]).append(&#34; &#34;);
                    i&#43;&#43;;
                }
                res &#61; bu.toString().trim();
            }
        }

        System.out.println(res);
    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E4%B9%9D%E9%A2%98%C2%A0%20%E8%B4%AD%E4%B9%B0%E6%9C%80%E5%A4%9A%E5%95%86%E5%93%81%E3%80%90%E7%A9%B7%E4%B8%BE%E6%B3%95%EF%BC%8CTreeSet%20%E6%8E%92%E5%BA%8F%E3%80%91">第九题  购买最多商品【穷举法&#xff0c;TreeSet 排序】</h3> 
<blockquote> 
 <p>/*<br />     双11众多商品进行打折销售&#xff0c;小明想购买一些自己心意的商品<br />     但由于受购买资金限制&#xff0c;所以他决定从众多心意商品中购买3件<br />     而且想尽可能的花完资金<br />     现在请你设计一个程序帮助小明计算尽可能花费的最大资金额</p> 
 <p>    输入描述<br />      第一行为整型数组M 数组长度小于100 数组元素记录单个商品的价格<br />      单个商品价格&lt;1000<br />      第二行输入为购买资金的额度R<br />      R&lt;100000</p> 
 <p>    输出描述<br />      输出为满足上述条件的最大花费额度<br />      如果不存在满足上述条件的商品请返回-1</p> 
 <p>    例子1<br />     输入<br />      23,26,36,27<br />      78<br />     输出<br />      76</p> 
 <p>    例子2<br />         输入<br />          23,30,40<br />          26<br />         输出<br />           -1</p> 
 <p>    备注&#xff1a;输入格式正确<br />      */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test9{
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;,&#34;);
        int total &#61; sc.nextInt();
        int[] m &#61; new int[split.length]; //注意开辟数组长度的写法
        for(int i&#61;0; i&lt;m.length; i&#43;&#43;){
            m[i] &#61; Integer.parseInt(split[i]);
        }

        TreeSet&lt;Integer&gt; ts &#61; new TreeSet&lt;&gt;(); //必须加泛型&#xff0c;不加的话会告警 unsafe operation
        for(int i&#61;0;i&lt;m.length;i&#43;&#43;){
            for(int j&#61;i&#43;1;j&lt;m.length;j&#43;&#43;){
                for(int k&#61;j&#43;1;k&lt;m.length;k&#43;&#43;){
                    int sum &#61; m[i]&#43;m[j]&#43;m[k];
                    if(sum&lt;&#61;total){
                        ts.add(sum);
                    }
                }
            }
        }

        if(0&#61;&#61;ts.size()){
            System.out.println(-1);
        }else{
            System.out.println(ts.last());
        }
    }
}</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E9%A2%98%C2%A0%20%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%8E%92%E5%BA%8F">第十题  字符串排序</h3> 
<blockquote> 
 <p>/*<br />         给定两个字符串<br />         从字符串2中找出字符串1中的所有字符<br />         去重并按照ASCII码值从小到大排列<br />         输入字符串1长度不超过1024<br />         字符串2长度不超过100</p> 
 <p>        字符范围满足ASCII编码要求&#xff0c;按照ASCII由小到大排序</p> 
 <p>        输入描述&#xff1a;<br />          bach<br />          bbaaccddfg<br />          输出<br />           abc</p> 
 <p>          2<br />           输入<br />           fach<br />           bbaaccedfg<br />           输出<br />           acf</p> 
 <p>         */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.Scanner;
import java.util.TreeSet;

public class Test10 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;&#34;);
        String str &#61; sc.nextLine();
        TreeSet&lt;String&gt; ts &#61; new TreeSet&lt;&gt;();

        for(int i&#61;0; i&lt;split.length; i&#43;&#43;){
            if(str.contains(split[i])) ts.add(split[i]);
        }

        for(String t:ts){
            System.out.print(t);
        }

    }
}</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%B8%80%E9%A2%98%20int%20%E5%AD%97%E8%8A%82%E5%92%8C%EF%BC%88%E4%BD%8D%E8%BF%90%E7%AE%97%EF%BC%89">第十一题 int 字节和&#xff08;位运算&#xff09;</h3> 
<blockquote> 
 <p>/*<br />         对一个数据a进行分类<br />         分类方法是 此数据a(4个字节大小)的4个字节相加对一个给定值b取模<br />         如果得到的结果小于一个给定的值c则数据a为有效类型<br />         其类型为取模的值<br />         如果得到的结果大于或者等于c则数据a为无效类型</p> 
 <p>        比如一个数据a&#61;0x01010101 b&#61;3<br />         按照分类方法计算  (0x01&#43;0x01&#43;0x01&#43;0x01)%3&#61;1<br />         所以如果c等于2 则此a就是有效类型  其类型为1<br />         如果c等于1 则此a是无效类型</p> 
 <p>         又比如一个数据a&#61;0x01010103 b&#61;3<br />          按分类方法计算(0x01&#43;0x01&#43;0x01&#43;0x03)%3&#61;0<br />          所以如果c&#61;2则此a就是有效类型  其类型为0<br />          如果c等于0 则此a是无效类型</p> 
 <p>         输入12个数据<br />          第一个数据为c  第二个数据为b<br />          剩余10个数据为需要分类的数据</p> 
 <p>         请找到有效类型中包含数据最多的类型<br />          并输出该类型含有多少个数据</p> 
 <p>         输入描述<br />          输入12个数据用空格分割<br />          第一个数据为c  第二个数据为b<br />          剩余10个数据为需要分类的数据</p> 
 <p>         输出描述<br />          请找到有效类型中包含数据最多的类型<br />          并输出该类型含有多少个数据</p> 
 <p>         实例&#xff1a;<br />            输入<br />              3 4 256 257 258 259 260 261 262 263 264 265<br />            输出<br />              3<br />            说明<br />            这10个数据4个字节相加后的结果分别是<br />             1 2 3 4 5 6 7 8 9 10<br />             故对4取模的结果为<br />             1 2 3 0 1 2 3 0 1 2<br />             c是3所以012都是有效类型<br />             类型为1和2的有3个数据<br />             类型为0和3的只有两个</p> 
 <p>         例子2<br />          输入<br />          1 4 256 257 258 259 260 261 262 263 264 265<br />          输出<br />          2<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
//思路
// split[i] -&gt; sum[i]
// x &#61; sum[i]%b&gt;c
// map.put(x,map.contains(x)?(map.get(x)&#43;1):1)

public class Test11{
    public static void main(String[] args){

        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        int c &#61; Integer.parseInt(split[0]);
        int b &#61; Integer.parseInt(split[1]);

        HashMap&lt;Integer,Integer&gt; map &#61; new HashMap&lt;&gt;();
        for(int i&#61;2; i&lt;split.length; i&#43;&#43;){
            int x &#61; intGetSum( Integer.parseInt(split[i]) ) % b;
            if(x &lt; c)
                map.put(x,(map.containsKey(x)?(map.get(x)&#43;1):1));
        }

        int max&#61;0;
        for(Integer value:map.values()){
            if(value&gt;max)max&#61;value;
        }
        System.out.println(max);

    }

    private static int intGetSum(int n){
        int sum&#61;0;
        for(int i&#61;0;i&lt;4;i&#43;&#43;){
            sum&#43;&#61;(byte)(n&gt;&gt;(i*8));
        }
        return sum;
    }
}</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E6%97%A0%E9%A2%98%E7%9B%AE%EF%BC%8C%E5%A5%BD%E5%83%8F%E6%98%AF%E8%BF%B7%E5%AE%AB">第十二题  无题目&#xff0c;好像是迷宫</h3> 
<pre><code class="language-java">import java.util.*;
public class Test12 {
    private static int max &#61; 0;
    private static char[][] chars;

    public static void main(String[] args) {
        /*
        3,4
        f,m,m,f
        f,m,m,f
        f,f,f,m
        3
         */
        Scanner in &#61; new Scanner(System.in);
        String[] split &#61; in.nextLine().split(&#34;,&#34;);
        int row &#61; Integer.parseInt(split[0]);
        int col &#61; Integer.parseInt(split[1]);
        chars &#61; new char[row][col];
        for (int i &#61; 0; i &lt; row; i&#43;&#43;) {
            char[] split1 &#61; in.nextLine().replaceAll(&#34;,&#34;, &#34;&#34;).toCharArray();
            for (int j &#61; 0; j &lt; col; j&#43;&#43;) {
                chars[i][j] &#61; split1[j];
            }
        }

        int i1 &#61; find3(0, 1);
        if (i1 &gt; max) max &#61; i1;

        System.out.println(max);

        in.close();
    }

    private static int find1(int row, int col) {
        if (chars[row][col] !&#61; &#39;m&#39;) return 0;
        else return 1 &#43; find1(row, col &#43; 1);
    }

    private static int find2(int row, int col) {
        if (chars[row][col] !&#61; &#39;m&#39;) return 0;
        else return 1 &#43; find2(row &#43; 1, col);
    }

    private static int find3(int row, int col) {
        if (chars[row][col] !&#61; &#39;m&#39;) return 0;
        else return 1 &#43; find3(row &#43; 1, col &#43; 1);
    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%B8%89%E9%A2%98%20%E4%BA%8C%E5%8F%89%E6%A0%91%E5%AD%98%E5%82%A8%E6%95%B0%E7%BB%84">第十三题 二叉树存储数组</h3> 
<blockquote> 
 <p> /*<br />         二叉树也可以用数组来存储<br />         给定一个数组<br />         树的根节点的值储存在下标1<br />         对于储存在下标n的节点&#xff0c;<br />         他的左子节点和右子节点分别储存在下标2*n和2*n&#43;1<br />         并且我们用-1代表一个节点为空<br />         给定一个数组存储的二叉树<br />         试求从根节点到最小的叶子节点的路径<br />         路径由节点的值组成</p> 
 <p>        输入描述<br />         输入一行为数组的内容<br />         数组的每个元素都是正整数&#xff0c;元素间用空格分割<br />         注意第一个元素即为根节点的值<br />         即数组的第n元素对应下标n<br />         下标0在树的表示中没有使用<br />         所以我们省略了<br />         输入的树最多为7层</p> 
 <p>        输出描述<br />          输出从根节点到最小叶子节点的路径上各个节点的值<br />          由空格分割<br />          用例保证最小叶子节点只有一个</p> 
 <p>         例子<br />           输入<br />           3 5 7 -1 -1 2 4<br />           输出<br />            3 7 2</p> 
 <p>          例子<br />            输入<br />           5 9 8 -1 -1 7 -1 -1 -1 -1 -1 6<br />            输出<br />           5 8 7 6<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;

public class Test13 {
    public static void main(String[] args){
        /*
        给定一个数组存储的二叉树
        试求从根节点到最小的叶子节点的路径
        路径由节点的值组成

        先找到最小节点值&#xff0c;然后 indexOf 找出索引位
        然后根据节点生成算法 n,n&#43;1 反推回索引为1的根节点
        过程中的值保存起来 如 3 2 1
        最后输出时再颠倒一下顺序 1 2 3
        */
        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);

        //第一步 重建二叉树数组
        ArrayList&lt;Integer&gt; list &#61; new ArrayList&lt;&gt;();
        list.add(Integer.MAX_VALUE);//二叉树数组 第0位不使用&#xff0c;这里用超大值填充
        for(String s:split){
            list.add(Integer.parseInt(s)); //二叉树数组重建完毕
        }

        //第二步 寻找最小叶子结点
        int min&#61;Integer.MAX_VALUE;
        for(Integer i:list){
            if( !i.equals(list.get(1)) &amp;&amp; (i!&#61;-1) ){
                if(i&lt;min) min &#61; i;
            }
        }

        //第三步 确定最小叶子结点在二叉树数组的下标 index
        int indexMin &#61; list.indexOf(min);

        //第四步 反推回根节点,获得路径值
        ArrayList&lt;Integer&gt; list2 &#61; new ArrayList&lt;&gt;();
        for(int i&#61;indexMin; i&gt;0;){
            list2.add(list.get(i));
            i &#61; i/2;
        }

        //第五步 颠倒输出
        StringBuilder bu &#61; new StringBuilder();
        for(int i &#61; list2.size()-1; i&gt;&#61;0 ;i--)
        {
            bu.append(list2.get(i)).append(&#34; &#34;);
        }

        System.out.println(bu.toString().trim());

    }
}
</code></pre> 
<p></p> 
<h3 id="%E7%AC%AC%E5%8D%81%E5%9B%9B%E9%A2%98%C2%A0%20%E8%A3%85%E6%9C%80%E5%A4%9A%E5%BF%AB%E9%80%92">第十四题  装最多快递</h3> 
<blockquote> 
 <p>/*<br />         一辆运送快递的货车<br />         运送的快递放在大小不等的长方体快递盒中<br />         为了能够装载更多的快递同时不能让货车超载<br />         需要计算最多能装多少个快递<br />         注&#xff1a;快递的体积不受限制<br />         快递数最多1000个<br />         货车载重最大50000<br />         输入描述<br />          第一行输入每个快递的重量<br />          用英文逗号隔开<br />          如 5,10,2,11<br />          第二行输入货车的载重量<br />           如 20<br />         输出描述<br />          输出最多能装多少个快递<br />          如 3<br />          示例一<br />           输入<br />           5,10,2,11<br />           20<br />           输出<br />           3<br />          */</p> 
</blockquote> 
<p></p> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%BA%94%E9%A2%98%C2%A0%20%E8%88%AA%E5%A4%A9%E5%99%A8%E5%A4%AA%E9%98%B3%E8%83%BD%E6%9D%BF%EF%BC%8C%E6%97%A0%E5%9B%BE%E7%9C%8B%E4%B8%8D%E6%87%82">第十五题  航天器太阳能板&#xff0c;无图看不懂</h3> 
<blockquote> 
 <p>/*<br />         给航天器一侧加装长方形和正方形的太阳能板(图中的斜线区域)<br />         需要先安装两个支柱(图中的黑色竖条)<br />         再在支柱的中间部分固定太阳能板<br />         但航天器不同位置的支柱长度不同<br />         太阳能板的安装面积受限于最短一侧的那支支柱的长度</p> 
 <p>        现提供一组整型数组的支柱高度数据<br />         假设每个支柱间的距离相等为一个单位长度<br />         计算如何选择两根支柱可以使太阳能板的面积最大</p> 
 <p>        输入描述<br />         10,9,8,7,6,5,4,3,2,1<br />         注释&#xff0c;支柱至少有两根&#xff0c;最多10000根&#xff0c;能支持的高度范围1~10^9的整数</p> 
 <p>        柱子的高度是无序的<br />         例子中的递减是巧合</p> 
 <p>        输出描述<br />         可以支持的最大太阳板面积:(10m高支柱和5m高支柱之间)<br />         25</p> 
 <p>        示例1<br />         输入<br />         10,9,8,7,6,5,4,3,2,1<br />         输出<br />         25<br />         备注 10米高支柱和5米高支柱之间宽度为5&#xff0c;高度取小的支柱高度也是5<br />         面积为25<br />         任取其他两根支柱所能获得的面积都小于25 所以最大面积为25</p> 
 <p>         */</p> 
</blockquote> 
<p></p> 
<h3 id="%E7%AC%AC%E5%8D%81%E5%85%AD%E9%A2%98%C2%A0%20%E5%8D%95%E8%AF%8D%E6%8E%A5%E9%BE%99%C2%A0%20%E5%90%8E%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%89%8D%E7%BC%80%E6%98%AF%E5%89%8D%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%90%8E%E7%BC%80">第十六题  单词接龙  后一个字符串前缀是前一个字符串后缀</h3> 
<blockquote> 
 <p>/*<br />         单词接龙的规则是<br />         可用于接龙的单词 首字母必须要与前一个单词的尾字母相同<br />         当存在多个首字母相同的单词时&#xff0c;取长度最长的单词<br />         如果长度也相等&#xff0c;则取字典序最小的单词<br />         已经参与接龙的单词不能重复使用<br />         现给定一组全部由小写字母组成的单词数组<br />         并指定其中一个单词为起始单词<br />         进行单词接龙<br />         请输出最长的单词串<br />         单词串是单词拼接而成的中间没有空格</p> 
 <p>        输入描述<br />         输入第一行为一个非负整数<br />         表示起始单词在数组中的索引k<br />         0&lt;&#61;k&lt;N<br />         输入的第二行为非负整数N<br />         接下来的N行分别表示单词数组中的单词</p> 
 <p>        输出描述&#xff0c;<br />         输出一个字符串表示最终拼接的单词串</p> 
 <p>        示例<br />         0<br />         6<br />         word<br />         dd<br />         da<br />         dc<br />         dword<br />         d</p> 
 <p>        输出<br />         worddwordda<br />         说明 先确定起始单词word 在接dword<br />         剩余dd da dc 则取da</p> 
 <p>       示例2<br />         4<br />         6<br />         word<br />         dd<br />         da<br />         dc<br />         dword<br />         d</p> 
 <p>        输出<br />         dwordda</p> 
 <p>        单词个数1&lt;N&lt;20<br />         单个单词的长度  1~30</p> 
 <p>         */</p> 
</blockquote> 
<pre><code class="language-java">/*题目16单词接龙
 TreeSet 确保自然升序
考察 String str.substring(begin index) 取index 到结尾的子串
boolean  str.startsWith(str2)  字符串 str是否以 str2 开头
有思路了&#xff0c;就差写了。今天太晚了&#xff0c;先过&#xff0c;回头再写
        
        首字母必须要与前一个单词的尾字母相同&#xff08;str2.startsWith(str.substr(length-1))&#xff09;
        1 当存在多个首字母相同的单词时&#xff0c;取长度最长的单词
        2 如果长度也相等&#xff0c;则取字典序最小的单词(1 2都可以用 TreeSet 一次性解决)
        已经参与接龙的单词不能重复使用&#xff08;用一个单词&#xff0c;就从 list 里删掉它&#xff09;
        
        输入
            起始index
            总共单词个数
            分行输入单词
        输出
            接龙后的单词组合字符串&#xff0c;中间无空格
            
        思路&#xff1a;
        list 存放输入原始单词列表
        */

import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.concurrent.BrokenBarrierException;

/**
 * Created with IntelliJ IDEA.
 * Author: Amos
 * E-mail: amos&#64;amoscloud.com
 * Date: 2020/11/30
 * Time: 12:42
 * Description:
 */
public class Demo16 {
    public static void main(String[] args) {

        Scanner in &#61; new Scanner(System.in);

        int k &#61; Integer.parseInt(in.nextLine());
        int N &#61; Integer.parseInt(in.nextLine());
        ArrayList&lt;String&gt; list &#61; new ArrayList&lt;&gt;();
        for (int i &#61; 0; i &lt; N; i&#43;&#43;) {
            list.add(in.nextLine());
        }

        StringBuilder builder &#61; new StringBuilder();
        String head &#61; list.get(k);
        builder.append(head);
        list.remove(k);

        String tail &#61; head.substring(head.length() - 1);

        while (true) {
            TreeSet&lt;String&gt; set &#61; new TreeSet&lt;&gt;();

            for (int i &#61; 0; i &lt; list.size(); i&#43;&#43;) {
                String word &#61; list.get(i);
                if (word.startsWith(tail)) {
                    set.add(word);
                }
            }
            if (set.size() &#61;&#61; 0) break;
            String first &#61; set.pollFirst();
            int len &#61; first.length();
            String aim &#61; &#34;&#34;;
            for (String s : set) {
                if (s.length() &gt; len) {
                    len &#61; s.length();
                    aim &#61; s;
                }
            }
            String into &#61; len !&#61; first.length() ? aim : first;
            tail &#61; into.substring(into.length() - 1);
            builder.append(into);
            list.remove(into);
        }
        System.out.println(builder.toString());

        in.close();
    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%B8%83%E9%A2%98%C2%A0%20%E7%AC%AC%20k%20%E9%95%BF%E5%AD%90%E4%B8%B2">第十七题  第 k 长子串</h3> 
<blockquote> 
 <p>/*<br />     给定一个字符串<br />     只包含大写字母<br />     求在包含同一字母的子串中<br />     长度第K长的子串<br />     相同字母只取最长的子串</p> 
 <p>    输入<br />      第一行 一个子串 1&lt;len&lt;&#61;100<br />      只包含大写字母<br />      第二行为k的值</p> 
 <p>     输出<br />      输出连续出现次数第k多的字母的次数</p> 
 <p>     例子&#xff1a;<br />      输入<br />              AABAAA<br />              2<br />      输出<br />              1<br />        同一字母连续出现最多的A 3次<br />        第二多2次  但A出现连续3次</p> 
 <p>    输入</p> 
 <p>    AAAAHHHBBCDHHHH<br />     3</p> 
 <p>    输出<br />     2</p> 
 <p>//如果子串中只包含同一字母的子串数小于k</p> 
 <p>则输出-1</p> 
 <p> */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;

public class Test17 {
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String str &#61; sc.nextLine();
        int k &#61; sc.nextInt();

        //第一步 将字符串按照 字母,次数 放入map 映射中
        HashMap&lt;Character,Integer&gt; map &#61; new HashMap&lt;&gt;();
        char[] chars &#61; str.toCharArray();

        char cur&#61;chars[0];
        int count&#61;1;
        map.put(cur,count);

        for(int i&#61;1; i&lt;chars.length; i&#43;&#43;){
            char c&#61;chars[i];
            if(c&#61;&#61;cur)count&#43;&#43;;
            else{
                cur &#61; c;
                count &#61; 1;
            }

            map.put(cur,map.containsKey(cur)?(map.get(cur)&gt;count?map.get(cur):count):count);
        }

        //第二步 按字母出现次数排序
        //      2.1先将其转化为  字母-次数  形式的 list 列表
        //      2.2然后list.sort(new Comparator(){自定义排序规则})
        ArrayList&lt;String&gt; list &#61; new ArrayList&lt;&gt;();
        for(Map.Entry&lt;Character,Integer&gt; entry:map.entrySet()){
            list.add(entry.getKey()&#43;&#34;-&#34;&#43;entry.getValue());
        }

        list.sort(new Comparator&lt;String&gt;(){
            &#64;Override
            public int compare(String o1, String o2){
                return o2.split(&#34;-&#34;)[1].compareTo(o1.split(&#34;-&#34;)[1]); //如果是 Integer 可以直接相减&#xff0c;String 或其它类型就得用 compareTo 比较大小了
            }
        });

        //第三步 取出 第 k 个
        if(k&gt;list.size()){
            System.out.println(-1);
        }else{
            System.out.println(list.get(k-1).split(&#34;-&#34;)[1]);
        }


    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E5%85%AB%E9%A2%98%C2%A0%20%E5%96%8A7">第十八题  喊7</h3> 
<blockquote> 
 <p> /*<br />         喊7 是一个传统的聚会游戏<br />         N个人围成一圈<br />         按顺时针从1-7编号<br />         编号为1的人从1开始喊数<br />         下一个人喊得数字是上一个人喊得数字&#43;1<br />         但是当将要喊出数字7的倍数或者含有7的话<br />         不能喊出 而是要喊过</p> 
 <p>        假定N个人都没有失误。<br />         当喊道数字k时<br />         可以统计每个人喊 “过&#34;的次数</p> 
 <p>        现给定一个长度n的数组<br />         存储打乱的每个人喊”过&#34;的次数<br />         请把它还原成正确顺序</p> 
 <p>        即数组的第i个元素存储编号i的人喊“过“的次数</p> 
 <p>           输入为1行<br />            空格分割的喊过的次数<br />            注意k并不提供</p> 
 <p>           k不超过200<br />            数字个数为n<br />            输出描述</p> 
 <p>           输出为1行<br />            顺序正确的喊过的次数  空格分割</p> 
 <p>           例子<br />            输入<br />              0 1 0<br />            输出<br />              1 0 0</p> 
 <p>           只有一次过<br />            发生在7<br />            按顺序编号1的人遇到7  所以100<br />            结束时的k不一定是7 也可以是 8 9<br />              喊过都是100</p> 
 <p>             例子<br />            输入<br />              0 0 0 2 1<br />            输出<br />              0 2 0 1 0<br />            一共三次喊过<br />            发生在7 14 17<br />            编号为2 的遇到7 17<br />            编号为4 的遇到14<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test18 {
    /*
        7的倍数或含有7
        数组 打乱的喊过7次数
        请按正确顺序排序

        个数 &#61; 人数
        index 位置无所谓&#xff0c;刚开始打乱的
        HashMap
        1 0
        2 0
        3 0
        4 2
        5 1

        计算总次数&#xff0c;到达总次数就输出顺序累计结果

        //第一步 计算总次数
        total&#43;&#61;str[i];

        //第二步 模拟游戏&#xff0c;符合条件 cnt&#43;&#43;,cnt&gt;&#61;total则游戏结束&#xff0c;按顺序输出m
        int[] m &#61; new int[str.length];

        int cnt&#61;0;
        while(cnt&lt;total){
            if(cnt/(m[i]&#43;1)&#61;&#61;7 || cnt/(m[i]&#43;1)%10&#61;&#61;7){
                m[i] &#61; m[i]&#43;1;
                cnt&#43;&#43;;
            }
        }
    */

    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        //第一步 计算总次数
        int total &#61; 0; //喊7总次数
        for(String s:split){
            total&#43;&#61;Integer.parseInt(s);
        }

        //第二步 模拟游戏&#xff0c;符合条件 cnt&#43;&#43;,cnt&gt;&#61;total则游戏结束&#xff0c;按顺序输出m
        int[] m &#61; new int[split.length];
        int cnt&#61;0; //喊7次数
        int pos&#61;0; //位次
        for(int i&#61;1; i&lt;&#61;200; i&#43;&#43;){
            if(pos&#61;&#61;m.length)pos&#61;1;
            else pos&#43;&#43;; //位次从编号1开始到人数上限&#xff0c;然后再重回编号1

            if(i%7&#61;&#61;0 || i%10&#61;&#61;7){
                m[pos-1] &#61; m[pos-1]&#43;1;
                cnt&#43;&#43;;
            }
            if(cnt&#61;&#61;total) break; //喊7次数等于总次数则结束
        }

        StringBuilder bu &#61; new StringBuilder();
        for(int i&#61;0; i&lt;split.length; i&#43;&#43;){
            bu.append(m[i]).append(&#34; &#34;);
        }
        System.out.println(bu.toString().trim());

    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E5%8D%81%E4%B9%9D%E9%A2%98%C2%A0%20%E5%88%A0%E9%99%A4%E5%87%BA%E7%8E%B0%E6%AC%A1%E6%95%B0%E6%9C%80%E5%B0%91%E5%AD%97%E7%AC%A6%E4%B8%B2">第十九题  删除出现次数最少字符串</h3> 
<blockquote> 
 <p>/*<br />     删除字符串中出现次数最少的字符<br />     如果多个字符出现次数一样则都删除</p> 
 <p>    例子&#xff1a;<br />     输入<br />       abcdd<br />       字符串中只<br />      输出<br />       dd</p> 
 <p>    输入<br />       aabbccdd</p> 
 <p>    输出<br />       empty</p> 
 <p>      如果都被删除  则换为empty</p> 
 <p>     */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test19 {
    public static void main(String[] args){
        /*
    删除字符串中出现次数最少的字符
    如果多个字符出现次数一样则都删除
    
    思路
    第一步 建立map&lt;字符&#xff0c;次数&gt;映射
    put containsKey()有的话更新该 key 的 value&#43;1&#xff1b;没有的话新插入
    
    第二步 寻找出现次数最少的字符的次数 min
    
    第三步 遍历 map&#xff0c;符合value&#61;&#61;min条件的
    都将其对应的 key 值从原有字符串中替换为空&#34;&#34;&#xff08;这样还不破坏原有字符串顺序&#xff01;&#xff09;

     */
        Scanner sc &#61; new Scanner(System.in);
        String line &#61; sc.nextLine();
        char[] chars &#61; line.toCharArray();
        //第一步 建立map&lt;字符&#xff0c;次数&gt;映射
        HashMap&lt;Character,Integer&gt; map &#61; new HashMap&lt;&gt;();
        for(char c:chars){
            map.put(c,map.containsKey(c)?map.get(c)&#43;1:1);
        }

        //第二步 寻找出现次数最少的字符的次数 min
        Integer[] cnts &#61; new Integer[map.size()];
        Integer[] n &#61; map.values().toArray(cnts);
        Arrays.sort(n);
        Integer min &#61; n[0];

        //第三步 遍历 map&#xff0c;符合value&#61;&#61;min条件的
        //都将其对应的 key 值从原有字符串中替换为空&#34;&#34;&#xff08;这样还不破坏原有字符串顺序&#xff01;&#xff09;
        for(Map.Entry&lt;Character,Integer&gt; entry:map.entrySet()){
            if(min.equals(entry.getValue())){
                line&#61;line.replaceAll(entry.getKey()&#43;&#34;&#34;,&#34;&#34;);
            }
        }

        if(line.length()&#61;&#61;0)System.out.println(&#34;empty&#34;);
        else System.out.println(line);

    }
}</code></pre> 
<h3 id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E9%A2%98%C2%A0%20%E8%B5%B0%E5%88%B0%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E6%88%90%E5%91%98%E6%9C%80%E5%B0%8F%E6%AD%A5%E6%95%B0">第二十题  走到最后一个成员最小步数</h3> 
<blockquote> 
 <p>/*</p> 
 <p>        一个正整数数组 设为nums<br />         最大为100个成员<br />         求从第一个成员开始正好走到数组最后一个成员所使用的最小步骤数<br />                     3 5 9 4 2 6 8 3 5 4 3 9<br />         要求&#xff1a;<br />         1. 第一步 必须从第一元素起  且 1&lt;&#61;第一步步长&lt;len/2  (len为数组长度)<br />         2. 从第二步开始只能以所在成员的数字走相应的步数&#xff0c;不能多不能少&#xff0c;<br />          如果目标不可达返回-1<br />          只输出最小的步骤数量<br />         3. 只能向数组的尾部走不能向回走</p> 
 <p>        输入描述&#xff1a;<br />         有正整数数组 空格分割<br />         数组长度&lt;100</p> 
 <p>        输出描述 &#xff1a;<br />          正整数  最小步数<br />          不存在输出-1</p> 
 <p>         例子&#xff1a;<br />          输入<br />              7 5 9 4 2 6 8 3 5 4 3 9<br />          输出<br />             2<br />          第一个可选步长选择2<br />          从第一个成员7开始走两步到9<br />          第二步&#xff1a;从9经过9个成员到最后</p> 
 <p>         例子&#xff1a;<br />          输入<br />           1 2 3 7 1 5 9 3 2 1<br />          输出<br />           -1<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test20 {
    public static void main(String[] args){
    /*
        思路
        第一步 for 循环 1- (length/2-1)
                    int cnt&#61;1;
        第二步      for(i&#61;第一步结果;; ){
                        i &#61; i &#43; m[i];
                        cnt&#43;&#43;;
                        if(i&gt;length) {
                            cnt &#61; 0;
                            break;
                        }
                        if(i&#61;length)break;
                    }
                    if(cnt!&#61;0)list.add(cnt);
        第三步 list.sort() 取 list.get(0); list.size()&#61;&#61;0则返回-1
        答案是用 TreeSet  set.first() 是取出最低元素

    */
        Scanner sc &#61; new Scanner(System.in);
        String[] split &#61; sc.nextLine().split(&#34;\\s&#43;&#34;);
        int[] m &#61; new int[split.length];
        for(int i&#61;0; i&lt;m.length; i&#43;&#43;){
            m[i] &#61; Integer.parseInt(split[i]);
        }

        TreeSet&lt;Integer&gt; set &#61; new TreeSet&lt;&gt;();
        //第一步 第一步的 for 循环
        for(int i&#61;0;i&lt; (m.length/2)-1 ;i&#43;&#43;){

            int cnt &#61; 1;

            //第二步 for循环按值跳步
            for( int j&#61;i; ;){
                j &#61; j&#43;m[j];
                cnt&#43;&#43;;

                if(j&gt;m.length-1){  //索引&#43;值 超范围 直接返回。cnt&#61;0作为标志位。
                    cnt&#61;0;
                    break;
                }
                if(j&#61;&#61;m.length-1){ //索引&#43;值 正好到达最后一位&#xff0c;bingo 返回。
                    break;
                }
            }
            if(0!&#61;cnt){
                set.add(cnt);
            }
        }
        //第三步 取 set 最小值&#xff0c;如果 set 为空&#xff0c;则输出-1
        if(0&#61;&#61;set.size()) System.out.println(-1);
        else System.out.println(set.first());

    }
}
</code></pre> 
<h3 id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%80%E9%A2%98%EF%BC%88%E5%90%8C%E4%BA%8C%E5%8D%81%E9%A2%98%EF%BC%89">第二十一题&#xff08;同二十题&#xff09;</h3> 
<p></p> 
<h3 id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%BA%8C%E9%A2%98%C2%A0%20%E8%BD%AE%E6%B5%81%E5%90%88%E5%B9%B6%E6%96%B0%E6%95%B0%E7%BB%84">第二十二题  轮流合并新数组</h3> 
<blockquote> 
 <p> /*<br />         现在有多组整数数组<br />         需要将他们合并成一个新的数组<br />         合并规则从每个数组里按顺序取出固定长度的内容<br />         合并到新的数组<br />         取完的内容会删除掉<br />         如果改行不足固定长度&#xff0c;或者已经为空<br />         则直接取出剩余部分的内容放到新的数组中继续下一行</p> 
 <p>        输入描述<br />           第一 行每次读取的固定长度<br />           长度0&lt;len&lt;10<br />           第二行是整数数组的数目<br />           数目 0&lt;num&lt;10000<br />           第3~n行是需要合并的数组<br />           不同的数组用换行分割<br />           元素之间用逗号分割<br />           最大不超过100个元素</p> 
 <p>         输出描述<br />           输出一个新的数组&#xff0c;用逗号分割</p> 
 <p>          示例1<br />           输入<br />               3<br />               2<br />               2,5,6,7,9,5,7<br />               1,7,4,3,4<br />           输出<br />               2,5,6,1,7,4,7,9,5,3,4,7</p> 
 <p>          说明  获得长度3和数组数目2<br />              先遍历第一行 获得2,5,6<br />              再遍历第二行 获得1,7,4<br />              再循环回到第一行获得7,9,5<br />              再遍历第二行获得3,4<br />              再回到第一行获得7</p> 
 <p>          示例2<br />           输入<br />              4<br />              3<br />              1,2,3,4,5,6<br />              1,2,3<br />              1,2,3,4<br />            输出<br />              1,2,3,4,1,2,3,1,2,3,4,5,6<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test22 {
            /*
        要求 从 n 个数组中&#xff0c;每次读取固定长度
        轮流读取&#xff0c;拼接成一个字符串

        思路
        arraylist&lt;arraylist&lt;String&gt;&gt; list 存储输入的数组
        arraylist&lt;String&gt; res 存储拼接后的数组

        第一步 输入值存入 list 数组
        第二步 list 转到 res 中
        第三步 转成StringBuilder输出

        */
            public static void main(String[] args){
                Scanner sc &#61; new Scanner(System.in);
                int len &#61; Integer.parseInt(sc.nextLine());
                int num &#61; Integer.parseInt(sc.nextLine());
                ArrayList&lt;ArrayList&lt;String&gt;&gt; list &#61; new ArrayList&lt;&gt;();
                ArrayList&lt;String&gt; res &#61; new ArrayList&lt;&gt;();

                //第一步 输入数据放入list
                int total&#61;0;
                for(int i&#61;0; i&lt;num; i&#43;&#43;){
                    String[] split &#61; sc.nextLine().split(&#34;,&#34;);
                    total&#43;&#61;split.length;
                    list.add(new ArrayList&lt;String&gt;(Arrays.asList(split)));
                }

                //第二步 数组拼接后放入 res
                while(total!&#61;res.size()){
                    for(ArrayList&lt;String&gt; strlist:list){
                        if(0&#61;&#61;strlist.size()) continue;
                        int times &#61; Math.min(strlist.size(),len); //选择取数次数
                        for(int i&#61;0;i&lt;times;i&#43;&#43;){
                            res.add(strlist.remove(0)); //从原有数据删除&#43;赋值给 res
                        }
                    }
                }

                //第三步 放入 StringBuilder 输出
                StringBuilder bu &#61; new StringBuilder();
                for(int i&#61;0; i&lt;res.size()-1; i&#43;&#43;){
                    bu.append(res.get(i)).append(&#34;,&#34;);
                }
                bu.append(res.get(res.size()-1));

                System.out.println(bu.toString());

            }
}
</code></pre> 
<h3 id="%E7%AC%AC%E4%BA%8C%E5%8D%81%E4%B8%89%E9%A2%98%C2%A0%20%E7%A3%81%E7%9B%98%E5%AE%B9%E9%87%8F%E6%8E%92%E5%BA%8F">第二十三题  磁盘容量排序</h3> 
<blockquote> 
 <p>/*<br />         磁盘的容量单位常用的有<br />         M G T<br />         他们之间的换算关系为 1T &#61;1024G 1G&#61;1024M<br />         现在给定n块磁盘的容量&#xff0c;请对他们按从小到大的顺序进行稳定排序<br />         例如给定5块盘的容量<br />         5<br />         1T<br />         20M<br />         3G<br />         10G6T<br />         3M12G9M<br />         排序后的结果为<br />         20M<br />         3G<br />         3M 12G 9M<br />         1T,10G 6T<br />         注意单位可以重复出现<br />         上述3M 12G 9M表示的容量即为 3M 12G 9M 和12M 12G相等<br />         输入描述、<br />           输入第一行包含一个整数n<br />           2&lt;&#61;n&lt;&#61;100 表示磁盘的个数<br />           接下来的n行<br />           每行一个字符串<br />           2&lt;长度&lt;30<br />           表示磁盘的容量<br />           由一个或多个格式为MV的子串组成<br />           其中m表示容量大小<br />           v表示容量单位<br />           例如20M 1T<br />           磁盘容量的范围1~1024的正整数<br />           单位 M G T<br />          输出n行<br />          表示n块磁盘容量排序后的结果</p> 
 <p>         实例<br />          输入<br />          3<br />          1G<br />          2G<br />          1024M<br />         输出<br />         1G<br />         1024M<br />         2G<br />         说明&#xff1a;稳定排序要求相等值保留原来位置</p> 
 <p>        示例2<br />         3<br />         2G4m<br />         3M2G<br />         1T<br />         输出<br />         3M2G<br />         2G4M<br />         1T<br />          */</p> 
</blockquote> 
<pre><code class="language-java">import java.util.*;
public class Test23 {
    /*
    关键点&#xff0c;1单位换算  拆分前后单位&#xff0c;还好单位只有1位&#xff0c;好拆分。
                麻烦了&#xff0c;可能有多个 mV 【这里才是重点】
            2稳定排序  冒泡算法 Arrays.sort()也可以【答案还用 list.sort】
                String[] 数组存储

    思路&#xff1a;
    第一步 存 list
    第二步 list.sort&#xff0c;new Comparator&lt;&gt;(){}
    第三步 calc 计算 将mV统一化
*/
    public static void main(String[] args){
        Scanner sc &#61; new Scanner(System.in);
        int n &#61; Integer.parseInt(sc.nextLine());
        ArrayList&lt;String&gt; list &#61; new ArrayList&lt;&gt;();
        for(int i&#61;0; i&lt;n; i&#43;&#43;){
            list.add(sc.nextLine());
        }

        list.sort(new Comparator&lt;String&gt;(){
            &#64;Override
            public int compare(String o1,String o2){
                return calc(o1)-calc(o2);
            }
        });

        for(String s:list){
            System.out.println(s);
        }

    }

    private static int calc(String line){
        int size&#61;0;
        int len&#61;0;
        String upper &#61; line.toUpperCase();
        String[] split &#61; line.split(&#34;[A-Z]&#34;);
        for (String s : split) {
            len &#43;&#61; s.length();
            String v &#61; upper.substring(len, len &#43; 1);
            switch (v) {
                case &#34;M&#34;:
                    size &#43;&#61; Integer.parseInt(s);
                    break;
                case &#34;G&#34;:
                    size &#43;&#61; Integer.parseInt(s) * 1024;
                    break;
                case &#34;T&#34;:
                    size &#43;&#61; Integer.parseInt(s) * 1024 * 1024;
                    break;
                default:
                    break;
            }
        }
        return size;
    }

}
</code></pre> 
<p></p>
                </div>
        </div>
        <div id="treeSkill"></div>
    </article>
  <script>
  $(function() {
    setTimeout(function () {
      var mathcodeList = document.querySelectorAll('.htmledit_views img.mathcode');
      if (mathcodeList.length > 0) {
        var testImg = new Image();
        testImg.onerror = function () {
          mathcodeList.forEach(function (item) {
            $(item).before('<span class="img-codecogs">\\(' + item.alt + '\\)</span>');
            $(item).remove();
          })
          MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
        }
        testImg.src = mathcodeList[0].src;
      }
    }, 1000)
  })
  </script>
</div>
<div class="more-toolbox-new" id="toolBarBox">
    <div class="left-toolbox">
        <div class="toolbox-left">
            <div class="profile-box"><a class="profile-href" target="_blank" href="https://blog.csdn.net/u013598405"><img class="profile-img" src="https://profile.csdnimg.cn/7/B/0/3_u013598405"><span class="profile-name">coder 明轩</span></a></div>
            <div class="profile-attend">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;" data-report-view='{"mod":"1592215036_002","spm":"1001.2101.3001.4232","extend1":"关注"}'>关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
            <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart2021Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart2021White.png" alt="">  
                <span id="spanCount" class="count ">
                        9
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-unlike" id="is-unlike">
            <a class="tool-item-href">
                <img class="isactive" style="margin-right:0px;display:none" id="is-unlike-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newUnHeart2021Active.png" alt="">
                <img class="isdefault" style="margin-right:0px;display:block" id="is-unlike-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newUnHeart2021White.png" alt="">
                <span id="unlikeCount" class="count "></span>
            </a>
            <div class="tool-hover-tip"><span class="text space">踩</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
            <a class="tool-item-href" href="#commentBox" data-report-click='{"spm":"1001.2101.3001.7009"}'>
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newComment2021White.png" alt="">
                <span class="count">
                    4
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
            <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"popu_824","spm":"1001.2101.3001.4130","ab":"new"}'>
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectWhite.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectActive.png" alt="">
                <span class="count get-collection " id="get-collection">
                    151
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">收藏</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-reward">
                <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"popu_830","spm":"1001.2101.3001.4237","dest":"","ab":"new"}'>
                <img class="isdefault reward-bt" id="rewardBtNew" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newRewardWhite.png" alt="打赏">
                <span class="count"></span>
                </a>
                <div class="tool-hover-tip"><span class="text space">打赏</span></div>
            </li>
            <li class="tool-item tool-item-bar">
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"1582594662_002","spm":"1001.2101.3001.4129","ab":"new"}'>
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newShareWhite.png" alt="">
                </a>
                <div class="QRcode" id="tool-QRcode">
                    <p class="title">
                    扫一扫，分享内容
                    </p>
                    <div id='shareCode'></div>
                    <a id="copyPosterUrl" class="url" data-report-click='{"spm":"1001.2101.3001.7493"}' data-report-view='{"spm":"1001.2101.3001.7493"}'>点击复制链接</a>
                </div>
            </li>
        </ul>
        </div>
        <div class="toolbox-right">
                <div class="tool-directory">
                    <a class="bt-columnlist-show"
                    data-id="10739934"
                    data-free="true"
                    data-subscribe="false"
                    data-title="面试刷题"
                    data-img="https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64"
                    data-url="https://blog.csdn.net/u013598405/category_10739934.html"
                    data-sum="5"
                    data-people="9"
                    data-price="0"
                    data-oldprice="0"
                    data-join="false"
                    data-studyvip="false"
                    data-studysubscribe="false"
                    data-report-view='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    data-report-click='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    >专栏目录</a>
                </div>
        </div>
    </div>  
</div>
<script type=text/javascript crossorigin src="https://csdnimg.cn/release/phoenix/production/qrcode-7c90a92189.min.js"></script>
<script src="//g.csdnimg.cn/??sharewx/1.2.1/sharewx.js" type="text/javascript"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/user-login/3.0.1/user-login.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/collection-box/2.1.0/collection-box.js"></script>
            <script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_commontools-60a48feb57.min.js" type="text/javascript" async></script>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/u010475374/7976505"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~Paid-1-7976505-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"1","strategy":"2~default~CTRLIST~Paid","dest":"https://download.csdn.net/download/u010475374/7976505"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/u010475374/7976505" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~Paid-1-7976505-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"1","strategy":"2~default~CTRLIST~Paid","dest":"https://download.csdn.net/download/u010475374/7976505"}'  data-report-query='spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-7976505-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-7976505-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>华为</em><em>机试</em>参考<em>题</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">09-26</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/u010475374/7976505" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~Paid-1-7976505-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"1","strategy":"2~default~CTRLIST~Paid","dest":"https://download.csdn.net/download/u010475374/7976505"}'  data-report-query='spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-7976505-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-7976505-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">里面有几十道<em>华为</em>历届考过的<em>机试</em><em>题</em>，可供大家研究和参考，主要是里面的思想，只要理解透了里面的思想，非常有助于<em>机试</em>。</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div id="pcCommentBox" class="comment-box comment-box-new ">
	<div class="comment-title">评论<span>4</span></div>
	<div class="comment-edit-box d-flex">
		<div class="user-img">
			<a href="https://blog.csdn.net/u013598405" target="_blank">
				<img src="https://profile.csdnimg.cn/E/9/6/3_wangmike19">
			</a>
		</div>
		<form id="commentform">
			<textarea class="comment-content" name="comment_content" id="comment_content" placeholder="请发表有价值的评论， 博客评论不欢迎灌水，良好的社区氛围需大家一起维护。" maxlength="1000"></textarea>
			<div class="comment-operate-box active">
				<div class="comment-operate-l">
					<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
				</div>
				<div class="comment-operate-c">
					&nbsp;
				</div>
				<div class="comment-operate-r">
					<div class="comment-operate-item comment-emoticon">
						<img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentEmotionIcon.png" alt="表情包">
						<span class="comment-operate-tip">插入表情</span>
						<div class="comment-emoticon-box comment-operate-isshow">
							<div class="comment-emoticon-img-box"></div>
						</div>
					</div>
					<div class="comment-operate-item comment-code">
						<img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentCodeIcon.png" alt="表情包">
						<span class="comment-operate-tip">代码片</span>
						<div class="comment-code-box comment-operate-isshow">
							<ul id="commentCode">
								<li><a data-code="html">HTML/XML</a></li>
								<li><a data-code="objc">objective-c</a></li>
								<li><a data-code="ruby">Ruby</a></li>
								<li><a data-code="php">PHP</a></li>
								<li><a data-code="csharp">C</a></li>
								<li><a data-code="cpp">C++</a></li>
								<li><a data-code="javascript">JavaScript</a></li>
								<li><a data-code="python">Python</a></li>
								<li><a data-code="java">Java</a></li>
								<li><a data-code="css">CSS</a></li>
								<li><a data-code="sql">SQL</a></li>
								<li><a data-code="plain">其它</a></li>
							</ul>
						</div>
					</div>
					<div class="comment-operate-item">
						<input type="hidden" id="comment_replyId" name="comment_replyId">
						<input type="hidden" id="article_id" name="article_id" value="114239804">
						<input type="hidden" id="comment_userId" name="comment_userId" value="">
						<input type="hidden" id="commentId" name="commentId" value="">
						<a data-report-click='{"mod":"1582594662_003","spm":"1001.2101.3001.4227","ab":"new"}'><input type="submit" class="btn-comment btn-comment-input" value="评论"><input type="button" class="btn-comment-input btn-comment-defualt" value="评论"></a>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div class="comment-list-container">
		<div class="comment-list-box">
		</div>
		<div id="commentPage" class="pagination-box d-none"></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
		</div>
	</div>
</div>
            <div class="recommend-box insert-baidu-box recommend-box-style">
                <div class="recommend-item-box clearfix no-index" style="display:none"></div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/n8765/6265919"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2-6265919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://download.csdn.net/download/n8765/6265919"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/n8765/6265919" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2-6265919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://download.csdn.net/download/n8765/6265919"}'  data-report-query='spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2-6265919-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2-6265919-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>华为</em>上机笔试</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">09-14</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/n8765/6265919" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2-6265919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://download.csdn.net/download/n8765/6265919"}'  data-report-query='spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2-6265919-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2-6265919-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>华为</em>校园招聘笔试<em>题</em>---------上机，感觉每年考的差不多，大家可以参考</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/m0_60741207/article/details/121528375"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3-121528375-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/m0_60741207/article/details/121528375"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/m0_60741207/article/details/121528375" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3-121528375-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/m0_60741207/article/details/121528375"}'  data-report-query='spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-121528375-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-121528375-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">python<em>题</em>目56：<em>GPU</em><em>算力</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/m0_60741207" target="_blank"><span class="blog-title">m0_60741207的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1517
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/m0_60741207/article/details/121528375" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3-121528375-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/m0_60741207/article/details/121528375"}'  data-report-query='spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-121528375-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-121528375-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>为了</em><em>充分发挥</em><em>Gpu</em><em>算力</em>， 需要尽可能多的将任务交给<em>GPU</em>执行， 现在有一个任务数组， 数组元素表示在这1s内新增的任务个数， 且每秒都有新增任务， 假设<em>GPU</em>最多一次执行n个任务， 一次执行耗时1s， 在保证<em>Gpu</em>不空闲的情况下，最少需要多长时间执行完成。

输入描述 第一个参数为<em>gpu</em>最多执行的任务个数 取值范围1~10000 第二个参数为任务数组的长度 取值范围1~10000 第三个参数为任务数组 数字范围1~10000

输出描述 执行完所有任务需要多少秒

例子 输入 3 5 1 2 3 4 5 输</div>
			</a>
		</div>
	</div>
</div>
		<dl id="recommend-item-box-tow" class="recommend-item-box type_blog clearfix">
			
		</dl>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41010318/article/details/119961919"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4-119961919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/119961919"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41010318/article/details/119961919" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4-119961919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/119961919"}'  data-report-query='spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-119961919-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-119961919-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>题</em>目4 TLV编码解析</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41010318" target="_blank"><span class="blog-title">weixin_41010318的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-27</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3264
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41010318/article/details/119961919" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4-119961919-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/119961919"}'  data-report-query='spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-119961919-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-119961919-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">TLV编码是按 Tag Length Value格式进行编码的
    一段码流中的信元用tag标识，tag在码流中唯一不重复
    length表示信元value的长度 value表示信元的值
    码流以某信元的tag开头 ，tag固定占一个字节
    length固定占两个字节，字节序为小端序
    现给定tlv格式编码的码流以及需要解码的信元tag
    请输出该信元的value

    输入码流的16机制字符中，不包括小写字母...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_47243236/article/details/122554322"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-5-122554322-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"5","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122554322"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_47243236/article/details/122554322" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-5-122554322-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"5","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122554322"}'  data-report-query='spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-122554322-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-122554322-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">HUAWEI <em>机试</em><em>题</em>：最大消费金额</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_47243236" target="_blank"><span class="blog-title">weixin_47243236的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-18</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1686
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_47243236/article/details/122554322" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-5-122554322-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"5","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122554322"}'  data-report-query='spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-122554322-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-122554322-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">???? Scala 实现

<em>题</em>目描述：

双十一众多商品进行打折销售，小明想购买自己心仪的一些物品， 但由于购买资金限制，所以他决定从众多心仪商品中购买三件，而且想尽可能得花完资金。
现在请你设计一个程序，计算小明尽可能花费的最大资金数。

输入描述：

输入第一行为一维整型数组m，数组长度小于100，数组元素记录单个商品的价格。单个商品加个小于1000。
输入第二行为购买资金的额度r，r&lt;100000。
输入格式正确无需考虑输入错误情况

输出描述：

输出为满足上述条件的最大花费额度

注意：
</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_47243236/article/details/122775971"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6-122775971-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122775971"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_47243236/article/details/122775971" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6-122775971-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122775971"}'  data-report-query='spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-122775971-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-122775971-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">HUAWEI <em>机试</em><em>题</em>：<em>充分发挥</em><em>GPU</em><em>算力</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_47243236" target="_blank"><span class="blog-title">weixin_47243236的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">02-03</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2273
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_47243236/article/details/122775971" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6-122775971-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_47243236/article/details/122775971"}'  data-report-query='spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-122775971-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-122775971-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">???? Scala 实现

<em>题</em>目描述：

<em>为了</em><em>充分发挥</em><em>GPU</em><em>算力</em>，需要尽可能多的将任务交给<em>GPU</em>执行。
现在有一个任务数组，数组元素表示在这1s内新增的任务个数，且每秒都有新增任务。
假设<em>GPU</em>最多一次执行n个任务，一次执行耗时1s，在保证<em>GPU</em>不空闲的情况下，最少需要多长时间执行完成。

输入描述：

第一个参数为<em>GPU</em>最多执行的任务个数，取值范围1~10000
第二个参数为任务数组的长度，取值范围1~10000
第三个参数为任务数组，数字范围1~10000

输出描述：

执行完所有任务需要多少秒

</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41010318/article/details/120731158"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7-120731158-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731158"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41010318/article/details/120731158" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7-120731158-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731158"}'  data-report-query='spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-120731158-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-120731158-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>题</em>目9 购买心意的商品尽可能多的花完资金（ok）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41010318" target="_blank"><span class="blog-title">weixin_41010318的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1594
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41010318/article/details/120731158" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7-120731158-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731158"}'  data-report-query='spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-120731158-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-120731158-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">双11众多商品进行打折销售，小明想购买一些自己心意的商品
但由于受购买资金限制，所以他决定从众多心意商品中购买3件
而且想尽可能的花完资金
现在请你设计一个程序帮助小明计算尽可能花费的最大资金额

输入描述
第一行为整型数组M 数组长度小于100 数组元素记录单个商品的价格
单个商品价格&lt;1000
第二行输入为购买资金的额度R
R&lt;100000

输出描述
输出为满足上述条件的最大花费额度
如果不存在满足上述条件的商品请返回-1

例子1
输入
<em>23</em>,26,36,27
78
输出...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_44219664/article/details/123696249"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8-123696249-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696249"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_44219664/article/details/123696249" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8-123696249-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696249"}'  data-report-query='spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-123696249-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-123696249-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">寻找身高相近的小朋友</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_44219664" target="_blank"><span class="blog-title">weixin_44219664的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-23</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1181
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_44219664/article/details/123696249" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8-123696249-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696249"}'  data-report-query='spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-123696249-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-123696249-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">小明今年升学到了小学1年纪
来到新班级后，发现其他小朋友身高参差不齐
然后就想基于各小朋友和自己的身高差，对他们进行排序
请帮他实现排序
输入描述
第一行为正整数 h和n
0&lt;h&lt;200 为小明的身高
0&lt;n&lt;50 为新班级其他小朋友个数
第二行为n各正整数
h1 ~ hn分别是其他小朋友的身高
取值范围0&lt;hi&lt;200
且n个正整数各不相同
     输出描述
      输出排序结果，各正整数以空格分割
      和小明身高差绝对值最小的小朋友排在前面
      </div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41010318/article/details/120731055"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-9-120731055-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"9","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731055"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41010318/article/details/120731055" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-9-120731055-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"9","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731055"}'  data-report-query='spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-120731055-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-120731055-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>题</em>目7 小学生身高绝对值排序（ok）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41010318" target="_blank"><span class="blog-title">weixin_41010318的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1663
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41010318/article/details/120731055" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-9-120731055-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"9","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731055"}'  data-report-query='spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-120731055-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-120731055-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">小明今年升学到了小学1年纪
来到新班级后，发现其他小朋友身高参差不齐
然后就想基于各小朋友和自己的身高差，对他们进行排序
请帮他实现排序
输入描述
 第一行为正整数 h和n
 0&lt;h&lt;200 为小明的身高
 0&lt;n&lt;50 为新班级其他小朋友个数
 第二行为n各正整数
 h1 ~ hn分别是其他小朋友的身高
取值范围0&lt;hi&lt;200
且n个正整数各不相同

输出描述
 输出排序结果，各正整数以空格分割
 和小明身高差绝对值最小的小朋友排在前面...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41010318/article/details/120731013"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-10-120731013-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"10","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731013"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41010318/article/details/120731013" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-10-120731013-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"10","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731013"}'  data-report-query='spm=1001.2101.3001.6650.10&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-10-120731013-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-10-120731013-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>题</em>目6 计算<em>GPU</em><em>算力</em>（同<em>题</em>目58）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41010318" target="_blank"><span class="blog-title">weixin_41010318的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1488
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41010318/article/details/120731013" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-10-120731013-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"10","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120731013"}'  data-report-query='spm=1001.2101.3001.6650.10&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-10-120731013-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-10-120731013-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>为了</em><em>充分发挥</em><em>Gpu</em><em>算力</em>，
需要尽可能多的将任务交给<em>GPU</em>执行，
现在有一个任务数组，
数组元素表示在这1s内新增的任务个数，
且每秒都有新增任务，
假设<em>GPU</em>最多一次执行n个任务，
一次执行耗时1s，
在保证<em>Gpu</em>不空闲的情况下，最少需要多长时间执行完成。

输入描述
 第一个参数为<em>gpu</em>最多执行的任务个数
 取值范围1~10000
 第二个参数为任务数组的长度
 取值范围1~10000
 第三个参数为任务数组
 数字范围1~10000

输出描述
 执行完所有...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_44219664/article/details/123696147"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-123696147-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696147"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_44219664/article/details/123696147" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-123696147-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696147"}'  data-report-query='spm=1001.2101.3001.6650.11&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-123696147-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-123696147-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">执行时长 <em>为了</em><em>充分发挥</em><em>GPU</em><em>算力</em>需要尽可能多的将任务交给<em>GPU</em>执行</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_44219664" target="_blank"><span class="blog-title">weixin_44219664的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-23</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					882
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_44219664/article/details/123696147" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-123696147-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"11","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123696147"}'  data-report-query='spm=1001.2101.3001.6650.11&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-123696147-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-123696147-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>为了</em><em>充分发挥</em><em>GPU</em><em>算力</em>，需要尽可能多的将任务交给<em>GPU</em>执行，现在有一个任务数组，数组元素表示在这1秒内新增的任务个数且每秒都有新增任务，假设<em>GPU</em>最多一次执行n个任务，一次执行耗时1秒，在保证<em>GPU</em>不空闲情况下，最少需要多长时间执行完成
输入描述:
第一个参数为<em>GPU</em>一次最多执行的任务个数，取值范围[1, 10000]
第二个参数为任务数组长度，取值范围[1, 10000]
第三个参数为任务数组，数字范围[1, 10000]
输出描述:
执行完所有任务最少需要多少秒
示例1
输入
3
5
1 2 3 4 5</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qwqwfqfasf/article/details/124925259"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-124925259-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qwqwfqfasf/article/details/124925259"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qwqwfqfasf/article/details/124925259" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-124925259-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qwqwfqfasf/article/details/124925259"}'  data-report-query='spm=1001.2101.3001.6650.12&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-124925259-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-124925259-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">HUAWEI <em>机试</em><em>题</em>：<em>充分发挥</em><em>GPU</em><em>算力</em> （Python解法）</div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qwqwfqfasf" target="_blank"><span class="blog-title">qwqwfqfasf的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-23</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					234
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qwqwfqfasf/article/details/124925259" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-124925259-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"12","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qwqwfqfasf/article/details/124925259"}'  data-report-query='spm=1001.2101.3001.6650.12&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-124925259-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-124925259-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">https://blog.csdn.net/weixin_47243<em>23</em>6/article/details/122775971#comments_21461297
Python解法
N = int(input())
M = int(input())
arr = sorted(list(map(int, input().split(&#39; &#39;))))
res = 0
tmp = 0

for each in arr:
    res += 1
    if each + tmp &gt; N:
        t</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_44219664/article/details/123809235"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-123809235-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123809235"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_44219664/article/details/123809235" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-123809235-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123809235"}'  data-report-query='spm=1001.2101.3001.6650.13&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-123809235-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-123809235-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">太阳能板最大面积</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_44219664" target="_blank"><span class="blog-title">weixin_44219664的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1317
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_44219664/article/details/123809235" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-123809235-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"13","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_44219664/article/details/123809235"}'  data-report-query='spm=1001.2101.3001.6650.13&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-123809235-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-123809235-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">注意！答案仅作为参考（实际考试中下列代码通过用例100%，但不代表最优解）
给航天器一侧加装长方形和正方形的太阳能板(图中的斜线区域)
需要先安装两个支柱(图中的黑色竖条)
再在支柱的中间部分固定太阳能板
但航天器不同位置的支柱长度不同
太阳能板的安装面积受限于最短一侧的那支支柱的长度
现提供一组整型数组的支柱高度数据
假设每个支柱间的距离相等为一个单位长度
计算如何选择两根支柱可以使太阳能板的面积最大
    输入描述
    10,9,8,7,6,5,4,3,2,1
    注释，支柱至少有两根，最多1</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/meiribaofu/article/details/117068563"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-117068563-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/meiribaofu/article/details/117068563"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/meiribaofu/article/details/117068563" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-117068563-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/meiribaofu/article/details/117068563"}'  data-report-query='spm=1001.2101.3001.6650.14&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-117068563-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-117068563-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">牛客10道练习<em>题</em>2</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/meiribaofu" target="_blank"><span class="blog-title">meiribaofu的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-20</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/meiribaofu/article/details/117068563" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-117068563-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"14","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/meiribaofu/article/details/117068563"}'  data-report-query='spm=1001.2101.3001.6650.14&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-117068563-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-117068563-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">注意点：

机考可以本地IDE调试
	除<em>题</em>目限制，语言不限
	一共3道编程<em>题</em>：一星<em>题</em>目（2道），二星<em>题</em>目（1道）。每道<em>题</em>目一定要记得点击&ldquo;保存并调试&rdquo;，提交时点击&ldquo;提交本<em>题</em>型&rdquo;。注意，提交后无法再修改，一星<em>题</em>目的2道<em>题</em>是一起提交的！！！一定要2道<em>题</em>都保存并调试后再提交！！！
未提交之前可以通过答<em>题</em>卡标签切换<em>题</em>目。

牛客网的输入输出考前一定要练习下
	记得自行import包，不然会出现本地IDE通过，考<em>题</em>编译环境不通过
	知识点复习优先级：
数组、<em>字符串</em>、排序、递归、贪心、链表、栈、队列、分治、位运算、树、</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41010318/article/details/120840124"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120840124-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120840124"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41010318/article/details/120840124" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120840124-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120840124"}'  data-report-query='spm=1001.2101.3001.6650.15&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120840124-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120840124-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>题</em>目56 计算<em>GPU</em><em>算力</em>（同<em>题</em>目58）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41010318" target="_blank"><span class="blog-title">weixin_41010318的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-19</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1280
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41010318/article/details/120840124" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120840124-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_41010318/article/details/120840124"}'  data-report-query='spm=1001.2101.3001.6650.15&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120840124-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120840124-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>为了</em><em>充分发挥</em><em>Gpu</em><em>算力</em>，
需要尽可能多的将任务交给<em>GPU</em>执行，
现在有一个任务数组，
数组元素表示在这1s内新增的任务个数，
且每秒都有新增任务，
假设<em>GPU</em>最多一次执行n个任务，
一次执行耗时1s，
在保证<em>Gpu</em>不空闲的情况下，最少需要多长时间执行完成。

输入描述
第一个参数为<em>gpu</em>最多执行的任务个数
取值范围1~10000
第二个参数为任务数组的长度
取值范围1~10000
第三个参数为任务数组
数字范围1~10000

输出描述
执行完所有任务需要多少秒

例子
输入
3
5
1 2 3 4 5
输</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/sea2017/article/details/119087571"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-119087571-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/sea2017/article/details/119087571"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/sea2017/article/details/119087571" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-119087571-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/sea2017/article/details/119087571"}'  data-report-query='spm=1001.2101.3001.6650.16&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-119087571-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-119087571-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>华为</em><em>机试</em>HJ<em>23</em> 删除<em>字符串</em>中出现次数最少的字符</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/sea2017" target="_blank"><span class="blog-title">sea2017的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					78
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/sea2017/article/details/119087571" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-119087571-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/sea2017/article/details/119087571"}'  data-report-query='spm=1001.2101.3001.6650.16&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-119087571-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-119087571-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>华为</em><em>机试</em>HJ<em>23</em> 删除<em>字符串</em>中出现次数最少的字符-Python<em>题</em>目解<em>题</em>思路代码结果
<em>题</em>目
解<em>题</em>思路
1、输入的<em>字符串</em>，循环每个字符，查找<em>字符串</em>最少的，计入数组，记录最少次数
2、最少次数相同的，一起记录；持续查找次数相对更少的，替换掉发现的字符列表和最少次数。
代码
def func():
    s = input()
    res = []
    mincount = 20
    for c in s:
        # 已经统计过的字符，跳过
        if res.count(c) =</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hellolianhua/article/details/118859536"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-118859536-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/hellolianhua/article/details/118859536"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hellolianhua/article/details/118859536" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-118859536-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/hellolianhua/article/details/118859536"}'  data-report-query='spm=1001.2101.3001.6650.17&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-118859536-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-118859536-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>机试</em><em>题</em>笔记</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hellolianhua" target="_blank"><span class="blog-title">hellolianhua的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-17</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2224
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hellolianhua/article/details/118859536" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-118859536-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/hellolianhua/article/details/118859536"}'  data-report-query='spm=1001.2101.3001.6650.17&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-118859536-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-118859536-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">第一<em>题</em>：整数对最小和

1.1<em>题</em>目描述：

给定两个整数数组array1、array2，数组元素按升序排列。假设从array1、array2中分别取出一个元素可构成一对元素，现在需要取出k对元素，并对取出的所有元素求和，计算和的最小值

注意：两对元素如果对应于array1、array2中的两个下标均相同，则视为同一对元素。

输入描述:

输入两行数组array1、array2，每行首个数字为数组大小size(0 &lt; size &lt;= 100);

0 &lt; array1[i] &lt;= </div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/G1useppE/article/details/124728556"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-124728556-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/G1useppE/article/details/124728556"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/G1useppE/article/details/124728556" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-124728556-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/G1useppE/article/details/124728556"}'  data-report-query='spm=1001.2101.3001.6650.18&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-124728556-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-124728556-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">寻找身高相近的小朋友js</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/G1useppE" target="_blank"><span class="blog-title">G1useppE的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					366
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/G1useppE/article/details/124728556" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-124728556-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/G1useppE/article/details/124728556"}'  data-report-query='spm=1001.2101.3001.6650.18&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-124728556-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-124728556-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">小明今年升学到了小学1年级，来到新班级后，发现其他小朋友身高参差不齐，然后就想基于各小朋友和自己的身高差，对他们进行排序。请帮他实现排序：
输入描述
第一行为正整数 h和n
0&lt;h&lt;200 为小明的身高
0&lt;n&lt;50 为新班级其他小朋友个数
第二行为n各正整数
h1 ~ hn分别是其他小朋友的身高
取值范围0&lt;hi&lt;200
且n个正整数各不相同


     输出描述
      输出排序结果，各正整数以空格分割
      和小明身高差绝对值最小的小朋友排在前面
   </div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://zhaitianbao.blog.csdn.net/article/details/119107447"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.19","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119107447-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"19","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://zhaitianbao.blog.csdn.net/article/details/119107447"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://zhaitianbao.blog.csdn.net/article/details/119107447" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.19","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119107447-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"19","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://zhaitianbao.blog.csdn.net/article/details/119107447"}'  data-report-query='spm=1001.2101.3001.6650.19&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119107447-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119107447-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1"><em>华为</em><em>机试</em>HJ<em>23</em>：删除<em>字符串</em>中出现次数最少的字符</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/zhaitianbao" target="_blank"><span class="blog-title">翟天保的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-26</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://zhaitianbao.blog.csdn.net/article/details/119107447" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.19","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119107447-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"19","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://zhaitianbao.blog.csdn.net/article/details/119107447"}'  data-report-query='spm=1001.2101.3001.6650.19&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119107447-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119107447-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">C++实现&mdash;&mdash;删除<em>字符串</em>中出现次数最少的字符</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_34331113/article/details/122824104"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.20","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-20-122824104-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"20","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_34331113/article/details/122824104"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_34331113/article/details/122824104" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.20","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-20-122824104-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"20","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_34331113/article/details/122824104"}'  data-report-query='spm=1001.2101.3001.6650.20&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-20-122824104-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-20-122824104-blog-114239804.pc_relevant_default'>
					<div class="left ellipsis-online ellipsis-online-1">《<em>华为</em><em>机试</em>》刷<em>题</em>之HJ<em>23</em> 删除<em>字符串</em>中出现次数最少的字符</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_34331113" target="_blank"><span class="blog-title">胡萝卜</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">02-08</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					144
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_34331113/article/details/122824104" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.20","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-20-122824104-blog-114239804.pc_relevant_default\",\"dist_request_id\":\"1654911216196_83686\"}","dist_request_id":"1654911216196_83686","ab_strategy":"default","index":"20","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_34331113/article/details/122824104"}'  data-report-query='spm=1001.2101.3001.6650.20&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-20-122824104-blog-114239804.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-20-122824104-blog-114239804.pc_relevant_default'>
				<div class="desc ellipsis-online ellipsis-online-1">一、<em>题</em>目

二、示例

三、代码
while True:
    try:
        str1 = input()
        dic = {}
        result = &#39;&#39;
        for item in str1:
            if item not in dic:
                dic[item] = 1
            else:
                dic[item] += 1
        Min_index = m</div>
			</a>
		</div>
	</div>
</div>
            </div>
<div id="recommendNps" class="recommend-nps-box common-nps-box">
  <h3 class="aside-title">“相关推荐”对你有帮助么？</h3>
  <div class="aside-content">
      <ul class="newnps-list">
          <li class="newnps-item" data-type="非常没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel1.png" alt="">
                  <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey1.png" alt="">
              </div>
              <div class="newnps-text">非常没帮助</div>
          </li>
          <li class="newnps-item" data-type="没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel2.png" alt="">
                  <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey2.png" alt="">
              </div>
              <div class="newnps-text">没帮助</div>
          </li>
          <li class="newnps-item" data-type="一般">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel3.png" alt="">
                  <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey3.png" alt="">
              </div>
              <div class="newnps-text">一般</div>
          </li>
          <li class="newnps-item" data-type="有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel4.png" alt="">
                  <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey4.png" alt="">
              </div>
              <div class="newnps-text">有帮助</div>
          </li>
          <li class="newnps-item" data-type="非常有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel5.png" alt="">
                  <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey5.png" alt="">
              </div>
              <div class="newnps-text">非常有帮助</div>
          </li>
      </ul>
      <div class="newnps-form-box">
      <div class="newnps-form">
          <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
          <span class="newnps-btn">提交</span>
      </div>
      </div>
  </div>
</div>            <div class="template-box">
                <span>©️2022 CSDN</span>
                <span>皮肤主题：大白</span>
                <span> 设计师：CSDN官方博客</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;"></div>
<script src="https://g.csdnimg.cn/common/csdn-footer/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside">
<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/u013598405" target="_blank" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4121","dest":"https://blog.csdn.net/u013598405","ab":"new"}'>
                <img src="https://profile.csdnimg.cn/7/B/0/3_u013598405" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/u013598405" target="_blank" class="" id="uid" title="coder 明轩" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4122","dest":"https://blog.csdn.net/u013598405","ab":"new"}'>
                    <span class="name " username="u013598405">coder 明轩</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years" title="已加入 CSDN 8年">码龄8年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="暂无认证">
                    <img src="https://csdnimg.cn/identity/nocErtification.png" alt="">
                    暂无认证
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="19">
            <a href="https://blog.csdn.net/u013598405" data-report-click='{"mod":"1598321000_001","spm":"1001.2101.3001.4310"}' data-report-query="t=1">  
                <dt><span class="count">19</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click='{"mod":"1598321000_002","spm":"1001.2101.3001.4311"}' title="175762">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">17万+</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="421406">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click='{"mod":"1598321000_003","spm":"1001.2101.3001.4312"}' target="_blank">
                <dt><span class="count">42万+</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="22780">  
            <dt><span class="count">2万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="2级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="https://csdnimg.cn/identity/blog2.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="255">
            <dt><span class="count">255</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="70">
            <dt><span class="count" id="fan">70</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="18">
            <dt><span class="count">18</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="6">
            <dt><span class="count">6</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="190">
            <dt><span class="count">190</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer" data-report-view='{"spm":"3001.4296"}'>
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="持之以恒">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/chizhiyiheng@240.png" alt="持之以恒">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv2">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qixiebiaobing2@240.png" alt="勤写标兵Lv2">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/u013598405" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent" >关注</a>  
        </div>
    </div>
</div>
 <div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="//csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/u013598405/article/details/114239804" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/u013598405/article/details/114239804","ab":"new"}'>
				华为机试23题总结
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">14160</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/u013598405/article/details/118370761" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/u013598405/article/details/118370761","ab":"new"}'>
				labuladong算法小结
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">3965</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/u013598405/article/details/112570604" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/u013598405/article/details/112570604","ab":"new"}'>
				头结点的作用
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">1560</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/u013598405/article/details/53148439" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/u013598405/article/details/53148439","ab":"new"}'>
				virtualbox安装centos7
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">613</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/u013598405/article/details/113099318" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/u013598405/article/details/113099318","ab":"new"}'>
				[交作业]Java入门第三季7-1综合实战：简易扑克牌游戏
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">457</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box ">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_10723931.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_10723931.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        编程学习笔记
                    </span>
                </a>
                <span class="special-column-num">18篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_10739934.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_10739934.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        面试刷题
                    </span>
                </a>
                <span class="special-column-num">5篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_6517626.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_6517626.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        linux
                    </span>
                </a>
                <span class="special-column-num">3篇</span>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/u013598405/article/details/114239804#comments_20670464" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_20670464","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_20670464","ab":"new"}'>华为机试23题总结</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_41802443" class="user-name" target="_blank">Mendax92: </a>
                    <span class="code-comments">16题不是很明白。。 d 得排除在外么？ 我看规则上也没说~</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/u013598405/article/details/114239804#comments_19965650" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_19965650","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_19965650","ab":"new"}'>华为机试23题总结</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/Darnell0" class="user-name" target="_blank">Darnell0: </a>
                    <span class="code-comments">怎么测出来的，有测试用例库？</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/u013598405/article/details/114239804#comments_19901874" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_19901874","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_19901874","ab":"new"}'>华为机试23题总结</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_43653928" class="user-name" target="_blank">拂面Zzz: </a>
                    <span class="code-comments">服了，实测17题百分之六十五的通过率，这贴出来干嘛，csdn上还都是这串代码</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/u013598405/article/details/114239804#comments_18936973" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_18936973","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/114239804#comments_18936973","ab":"new"}'>华为机试23题总结</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_46545264" class="user-name" target="_blank">??Jack Li: </a>
                    <span class="code-comments"><img src="https://g.csdnimg.cn/static/face/emoji/022.png" alt='表情包' ><img src="https://g.csdnimg.cn/static/face/emoji/022.png" alt='表情包' ><img src="https://g.csdnimg.cn/static/face/emoji/022.png" alt='表情包' ><img src="https://g.csdnimg.cn/static/face/emoji/022.png" alt='表情包' ><img src="https://g.csdnimg.cn/static/face/emoji/022.png" alt='表情包' ></span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/u013598405/article/details/115891726#comments_17886846" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/115891726#comments_17886846","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/u013598405/article/details/115891726#comments_17886846","ab":"new"}'>CentOS8.2 64bit环境 安装memtier-benchmark 【2021.04.19测试可用】</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_43679037" class="user-name" target="_blank">谢白羽: </a>
                    <span class="code-comments">哥们问下，如果有bufferevent和ssl的报错怎么办</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box common-nps-box">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/u013598405/article/details/118370761" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/u013598405/article/details/118370761","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/u013598405/article/details/118370761","ab":"new"}'>labuladong算法小结</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/u013598405/article/details/116110762" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/u013598405/article/details/116110762","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/u013598405/article/details/116110762","ab":"new"}'>linux教程</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/u013598405/article/details/115891726" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/u013598405/article/details/115891726","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/u013598405/article/details/115891726","ab":"new"}'>CentOS8.2 64bit环境 安装memtier-benchmark 【2021.04.19测试可用】</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-list-item"><a href="https://blog.csdn.net/u013598405?type=blog&amp;year=2021&amp;month=06" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/u013598405?type=blog&amp;year=2021&amp;month=06"}'><span class="year">2021年</span><span class="num">20篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/u013598405?type=blog&amp;year=2016&amp;month=11" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/u013598405?type=blog&amp;year=2016&amp;month=11"}'><span class="year">2016年</span><span class="num">1篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><!-- google -->
<ins class="adsbygoogle"
  style="display:block"
  data-ad-client="ca-pub-1076724771190722"
  data-ad-slot="1894159733"
  data-ad-format="auto"
  data-full-width-responsive="true"
>
  <!-- 插入 万维广告 2-1 -->
  <div class="wwads-cn wwads-vertical" data-id="149" style="margin-top: 0;margin-bottom: 8px;background-color: #fff;max-width:300px;"></div>
  <!-- 插入 万维广告 3-1 -->
</ins>

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1076724771190722" crossorigin="anonymous"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({});
</script>

<!-- 插入 万维广告 3-2 -->
<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
<!-- 插入 万维广告 3-2 -->

<!-- 插入 万维广告 3-3 -->
<style>
  ins.adsbygoogle > .wwads-cn {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] {
    height: auto !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > * {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > .wwads-cn {
    display: block !important;
    text-align: center; /* 万维广告局中 */
  }
</style>
<!-- 插入 万维广告 3-3 --><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&adId=707&a=707&c=0&k=华为机试23题总结&spm=1001.2101.3001.5001&articleId=114239804&d=1&t=3&u=a2dc4316231f46c38f09d3f1917e4ac1" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class='groupfile' id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-tooltip/2.5/user-tooltip.js"></script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-medal/1.0.7/user-medal.js"></script>    </div>
<div class="recommend-right align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right" >
                        <div class='flex-column aside-box groupfile' id="groupfile">
                <div class="groupfile-div">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><!-- google -->
<ins class="adsbygoogle"
  style="display:block"
  data-ad-client="ca-pub-1076724771190722"
  data-ad-slot="4652838525"
  data-ad-format="auto"
  data-full-width-responsive="true"
>
  <!-- 插入 万维广告 2-1 -->
  <div class="wwads-cn wwads-vertical" data-id="149" style="margin-top: 0;margin-bottom: 8px;background-color: #fff;max-width:300px;"></div>
  <!-- 插入 万维广告 3-1 -->
</ins>

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1076724771190722" crossorigin="anonymous"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({});
</script>

<!-- 插入 万维广告 3-2 -->
<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
<!-- 插入 万维广告 3-2 -->

<!-- 插入 万维广告 3-3 -->
<style>
  ins.adsbygoogle > .wwads-cn {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] {
    height: auto !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > * {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > .wwads-cn {
    display: block !important;
    text-align: center; /* 万维广告局中 */
  }
</style>
<!-- 插入 万维广告 3-3 --><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&adId=5314&a=5314&c=0&k=华为机试23题总结&spm=1001.2101.3001.4834&articleId=114239804&d=1&t=3&u=dea901f5d6c94b7e91319661a498a087" style="display: block;width: 0px;height: 0px;"></div>
                </div>
            <div class='aside-box kind_person d-flex flex-column'>
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_10723931.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_10723931.html","ab":"new"}'>
                                        <div class="special-column-bar "></div>
                                        <img src="https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="">
                                            编程学习笔记
                                        </span>
                                    </a>
                                    <span class="special-column-num">18篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_10739934.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_10739934.html","ab":"new"}'>
                                        <div class="special-column-bar "></div>
                                        <img src="https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="">
                                            面试刷题
                                        </span>
                                    </a>
                                    <span class="special-column-num">5篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/u013598405/category_6517626.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/u013598405/category_6517626.html","ab":"new"}'>
                                        <div class="special-column-bar "></div>
                                        <img src="https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="">
                                            linux
                                        </span>
                                    </a>
                                    <span class="special-column-num">3篇</span>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>

<div class="recommend-right1  align-items-stretch clearfix" id="rightAsideConcision" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right-concision" >
            <div class='flex-column aside-box groupfile' id="groupfileConcision">
                <div class="groupfile-div1">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>
    </aside>
</div>

</div>
<div class="mask-dark"></div>
<script src="https://csdnimg.cn/public/sandalstrap/1.4/js/sandalstrap.min.js"></script>
<div class="skin-boxshadow"></div>
<div class="directory-boxshadow"></div>
<div id="rewardNew" class="reward-popupbox-new">
	<p class="rewad-title">打赏作者<span class="reward-close"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/closeBt.png"></span></p>
	<dl class="profile-box">
		<dd>
		<a href="https://blog.csdn.net/u013598405" data-report-click='{"mod":"popu_379","dest":"https://blog.csdn.net/u013598405","ab":"new"}'>
			<img src="https://profile.csdnimg.cn/7/B/0/3_u013598405" class="avatar_pic">
		</a>
		</dd>
		<dt>
			<p class="blog-name">coder 明轩</p>
			<p class="blog-discript">你的鼓励将是我创作的最大动力</p>
		</dt>
	</dl>
	<div class="reward-box-new">
			<div class="reward-content"><div class="reward-right"></div></div>
	</div>
	<div class="money-box">
				<span class="choose-money choosed" data-id="2">¥2</span>
				<span class="choose-money " data-id="4">¥4</span>
				<span class="choose-money " data-id="6">¥6</span>
				<span class="choose-money " data-id="10">¥10</span>
				<span class="choose-money " data-id="20">¥20</span>
				<input id="customizeMoney" class="customize-money" name="" type="" value="" placeholder="自定义"/>
				<div class="customize-tip">输入1-500的整数</div>
	</div>
	<div class="pay-box">
		<div class="pay-type-blance pay-type active" data-type="blance">
			<img class="unchoose" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newUnChoose.png" alt="">
			<img class="choose"src="https://csdnimg.cn/release/blogv2/dist/pc/img/newChoose.png" alt="">
			<span class="pay-type-name">余额支付</span>
			<span class="pay-type-num">(余额：-- )</span>
		</div>
		<div class="pay-type-money pay-type" data-type="money">
			<img class="unchoose" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newUnChoose.png" alt="">
			<img class="choose"src="https://csdnimg.cn/release/blogv2/dist/pc/img/newChoose.png" alt="">
			<span class="pay-type-name">扫码支付</span>
		</div>
	</div>
	<div class="sure-box">
		<div class="sure-box-money">
			<div class="code-box">
				<div class="code-num-box">
					<span class="code-name">扫码支付：</span><span class="code-num">¥2</span>
				</div>
				<div class="code-img-box">
					<div class="renovate">
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-time-out.png">
					<span>获取中</span>
					</div>
				</div>
				<div class="code-pay-box">
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/newWeiXin.png" alt="">
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/newZhiFuBao.png" alt="">
					<span>扫码支付</span>
				</div>
			</div>
		</div>
		<div class="sure-box-blance">
			<p class="tip">您的余额不足，请更换扫码支付或<a target="_blank" data-report-click='{"mod":"1597646289_003","spm":"1001.2101.3001.4302"}' href="https://i.csdn.net/#/wallet/balance/recharge?utm_source=RewardVip" class="go-invest">充值</a></p>
			<p class="is-have-money"><a class="reward-sure">打赏作者</a></p>
		</div>
	</div>
</div>
<div class="pay-code">
    <div class="pay-money">实付<span class="pay-money-span" data-nowprice='' data-oldprice=''>元</span></div>
    <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
    <div class="content-code">
    <div id="payCode" data-id="">
            <div class="renovate">
                <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-time-out.png">
                <span>点击重新获取</span>
            </div>
        </div>
        <div class="pay-style"><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/weixin.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/zhifubao.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/jingdong.png"></span><span class="text">扫码支付</span></div>
    </div>
    <div class="bt-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></div>
    <!-- <p style="margin-top: 8px;font-size: 14px;" class="text-center">支付成功即可阅读</p> -->
    <div class="pay-balance">
    <input type="radio" class="pay-code-radio" data-type="details"> 
    <span class="span">钱包余额</span>
    <span class="balance" style="color:#FC5531;font-size:14px;">0</span>  
    <div class="pay-code-tile">
        <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-help.png" alt="">
        <div class="pay-code-content">
            <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
            </div>
        </div>
    </div>
    </div>
    <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/recharge.png" alt=""><span  >余额充值</span></a>
</div>
<div style="display:none;">
	<img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
</div>
<div class="keyword-dec-box" id="keywordDecBox"></div>
</body>
    <!-- 富文本柱状图  -->
	<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/chart.css"/>
	<script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/lib/chart.min.js"></script>
    <script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/widget2chart.js"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_highlight-7e7de84184.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_common-fbcbe8567e.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/edit_copy_code-9c83e748f5.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/codesnippet/lib/highlight/styles/atom-one-light.css">
<script src="https://g.csdnimg.cn/user-accusation/1.0.5/user-accusation.js" type="text/javascript" ></script>
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                window.csdn.feedback({
                    "type":'blog',
                    "rtype":'article',
                    "rid":articleId,
                    "reportedName":username,
                    "submitOptions":{
                        "title":articleTitle,
                        "contentUrl":articleDetailUrl
                    },
                    "callback":function(){
                        showToast({
                            text: "感谢您的举报，我们会尽快审核！",
                            bottom: '10%', 
                            zindex: 9000, 
                            speed: 500,
                            time: 1500
                        });
                    }
                })
            })
        });
    })
</script>
    <script src="https://g.csdnimg.cn/baidu-search/1.0.11/baidu-search.js"  type="text/javascript"></script>
<script src="https://csdnimg.cn/release/download/old_static/js/qrcode.js"></script>
<script src="https://g.csdnimg.cn/lib/qrcode/1.0.0/qrcode.min.js"></script>
<script src="https://g.csdnimg.cn/user-ordercart/3.0.1/user-ordercart.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/user-ordertip/4.1.3/user-ordertip.js" type="text/javascript" ></script>
<script src="https://g.csdnimg.cn/order-payment/4.0.1/order-payment.js" type="text/javascript" ></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/common-a1dfbf1dc3.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/detail-b2ede61bfe.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/column-f317ee9bfe.min.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/side-toolbar/3.1/side-toolbar.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/copyright/1.0.4/copyright.js" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none",
                ignoreClass:"title-article"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/common/csdn-login-box/csdn-login-box.js"></script></html>
